[PATCH] D91630: [Parse] Add parsing support for C++ attributes on using-declarations
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 4 09:22:12 PST 2020
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from a few minor NFC changes and a documentation request. Thank you for this!
================
Comment at: clang/docs/LanguageExtensions.rst:623
+C++11 Attributes on using-declarations
+================================
+
----------------
Wrong number of `=` here -- should extend them to the end of the heading.
================
Comment at: clang/docs/LanguageExtensions.rst:630
+
+ [[clang::using_if_exists]] using foo::bar;
+
----------------
Can you also add `using foo::bar [[clang::using_if_exists]];` to show that we support the syntax in two locations?
================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:2419
static void handleAvailabilityAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ if (isa<UsingDecl>(D) || isa<UnresolvedUsingTypenameDecl>(D) ||
+ isa<UnresolvedUsingValueDecl>(D)) {
----------------
`isa<UsingDecl, UnresolvedUsingTypenameDecl, UnresolvedUsingValueDecl>(D)`
================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6952
}
+ } else if (isa<UsingDecl>(D) ||
+ isa<UnresolvedUsingTypenameDecl>(D) ||
----------------
Same suggestion here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91630/new/
https://reviews.llvm.org/D91630
More information about the cfe-commits
mailing list