[PATCH] D150528: [Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 23 12:47:11 PDT 2023
aaron.ballman added a comment.
In general, I think this is looking pretty good, thank you! I'll leave it to @erichkeane to do the final sign-off as attributes code owner since this is making a fair number of changes in that area.
================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4415-4419
+ S.Diag(AttrLoc, diag::err_attribute_wrong_decl_type)
+ << &Attr
+ << (Attr.isC11() ? ExpectedVariableOrField
+ : ExpectedVariableFieldOrTag);
+ return true;
----------------
================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4422-4424
+ S.Diag(AttrLoc, diag::err_alignas_attribute_wrong_decl_type)
+ << &Attr << DiagKind;
+ return true;
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150528/new/
https://reviews.llvm.org/D150528
More information about the cfe-commits
mailing list