aaron.ballman added inline comments.

================
Comment at: clang/lib/Parse/ParseDecl.cpp:1767
     }
     return ParseSimpleDeclaration(Context, DeclEnd, attrs,
                                   true);
----------------
Should this also be passed `DeclSpecStart`?


================
Comment at: clang/lib/Parse/ParseStmt.cpp:233
+    GNUAttributeLoc = Tok.getLocation();
+    MaybeParseGNUAttributes(Attrs);
+    goto Retry;
----------------
xbolva00 wrote:
> Since you know that tok is kw_attr, I think you can use 'ParseGNUAttributes'.
Agreed, you don't need to use the Maybe check here.


================
Comment at: clang/lib/Parse/ParseStmt.cpp:156
   StmtResult Res;
+  bool SeenGNUAttributes = false;
+  SourceLocation GNUAttributeLoc;
----------------
I think you can use `GNUAttributeLoc.isValid()` instead of using the extra 
local variable.


================
Comment at: clang/test/SemaCXX/warn-unused-label-error.cpp:23
+#pragma weak unused_local_static
+    __attribute__((unused)) // expected-error {{'unused' attribute cannot be 
applied to a statement}}
+    ;
----------------
This change in diagnostics makes me very happy!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64838



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

Reply via email to