xbolva00 marked an inline comment as done.
xbolva00 added inline comments.

================
Comment at: lib/Parse/ParseStmt.cpp:102
   ParsedAttributesWithRange Attrs(AttrFactory);
+  MaybeParseGNUAttributes(Attrs);
   MaybeParseCXX11Attributes(Attrs, nullptr, /*MightBeObjCMessageSend*/ true);
----------------
xbolva00 wrote:
> Maybe we check if Tok is kw__attribute and look ahead a few tokens to check 
> if attribute name is fallthough in ParseStatementOrDeclarationAfterAttributes.
> 
> Now, we always fall into
> 
> if ((getLangOpts().CPlusPlus || getLangOpts().MicrosoftExt ||
>          (StmtCtx & ParsedStmtContext::AllowDeclarationsInC) !=
>              ParsedStmtContext()) &&
>         isDeclarationStatement()) {
>       SourceLocation DeclStart = Tok.getLocation(), DeclEnd;
>       DeclGroupPtrTy Decl = ParseDeclaration(DeclaratorContext::BlockContext,
>                                              DeclEnd, Attrs);
>       return Actions.ActOnDeclStmt(Decl, DeclStart, DeclEnd);
>   }
Then we go to "ParseSimpleDeclaration" -> "ParseDeclarationSpecifier". What is 
quite strange for me, we do not set "Attrs" in ParseSimpleDeclaration from 
DS.getAttributes()..


Repository:
  rC Clang

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

https://reviews.llvm.org/D63299



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

Reply via email to