[PATCH] D147989: [clang] Fix Attribute Placement
Sam Tebbs via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 11 06:35:37 PDT 2023
samtebbs added a comment.
Thanks for the input Aaron and Martin. This is looking good. With the suggested changes (don't forget the test, you could try adding one to clang/test/Sema/attr-declspec-ignored.c and clang/test/SemaCXX/attr-declspec-ignored.cpp) and some formatting <https://llvm.org/docs/Contributing.html#how-to-submit-a-patch> I think it will be ready.
================
Comment at: clang/include/clang/Sema/DeclSpec.h:274
};
-
+
// Import type specifier type enumeration and constants.
----------------
There is still a whitespace change here.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:5045
}
-
+static unsigned GetDiagnosticTypeSpecifierIDWithAttrs(DeclSpec::TST T, const DeclSpec &DS){
+ if (T == DeclSpec::TST_enum) {
----------------
Thanks to C++ overloading, this can be called `GetDiagnosticTypeSpecifierID`, and I don't think it will need the `T` parameter since that can be fetched with `DS.getTypeSpecType()`.
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