aaron.ballman accepted this revision.
aaron.ballman added a comment.

LGTM, thank you for the fixes!



================
Comment at: clang/lib/Parse/ParseDecl.cpp:4656-4657
       !getLangOpts().ObjC) {
-    ProhibitAttributes(attrs);
+    ProhibitCXX11Attributes(attrs, diag::err_attributes_not_allowed,
+                            /*DiagnoseEmptyAttrs=*/true);
     if (BaseType.isUsable())
----------------
tbaeder wrote:
> aaron.ballman wrote:
> > Test coverage for this change?
> I did not add tests for these changes since they are NFC and already tested:
>   1) We test that empty `[[]]` are not allowed for example in 
> `clang/test/Parser/cxx0x-attributes.c:192`: `enum [[]] E1 e;`
>   2) We test that GNU-style attributes are still allowed for example in 
> `clang/test/Sema/ast-print.c:94`: `enum __attribute__((deprecated)) 
> EnumWithAttributes2 *EnumWithAttributes2Ptr;`
Ah, thanks, I missed that we had already tested both kinds of attributes 
instead of just one. (Same below.)


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

https://reviews.llvm.org/D97362

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

Reply via email to