[PATCH] D147989: [clang] Fix Attribute Placement

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 11 04:44:25 PDT 2023


aaron.ballman added a comment.

Thank you for working on this!

The changes are missing test coverage; please be sure to add that, along with a release note about the fix. I think there's likely more work to be done here as well, considering this behavior: https://godbolt.org/z/sdK3Gef75 (notice the suggested location for the fix-it -- that also needs to be fixed for this)



================
Comment at: clang/include/clang/Sema/DeclSpec.h:274
   };
-
   // Import type specifier type enumeration and constants.
----------------
Spurious whitespace change can be removed.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:58
 using namespace sema;
-
+bool isEnumClass = false;
 Sema::DeclGroupPtrTy Sema::ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType) {
----------------
samtebbs wrote:
> This being global could lead to issues where one overwrites the other. I think a better approach would be to create another version of `GetDiagnosticTypeSpecifierID` that takes the DeclSpec, then this won't be needed.
+1


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147989



More information about the cfe-commits mailing list