aaron.ballman marked an inline comment as done.
aaron.ballman added inline comments.


================
Comment at: clang/include/clang/Sema/DeclSpec.h:2068
     case DeclaratorContext::TrailingReturnVar:
+    case DeclaratorContext::Association:
       return false;
----------------
erichkeane wrote:
> Is this right?  According to the comment, this is 'true'if the identifier is 
> optional or required, but the mayOmitIdentifier, where you are returning 
> 'true' says optional or not allowed?  Does this make identifier 'not allowed' 
> here?
I believe this is correct -- associations used to be handled the same as type 
names, and we still want to handle them effectively as type names. The only 
distinction between an association and a type name is whether it can be a 
defining type specifier or not (type  name can be, association cannot be).

This is the function that tests whether you can put an identifier after the 
type; e.g., `int a` and I think it's logically consistent. May the identifier 
be omitted? Certainly, it must be. May it have an identifier? Definitely not.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126969/new/

https://reviews.llvm.org/D126969

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to