[PATCH] D90188: Add support for attribute 'using_if_exists'
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 23 07:25:39 PST 2020
aaron.ballman added inline comments.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:442
+ // Make the selection of the recovery decl deterministic.
+ (RealRes)->getLocation().getRawEncoding() <
IIDecl->getLocation().getRawEncoding())
----------------
================
Comment at: clang/lib/Sema/SemaDecl.cpp:1173
+ if (auto *EmptyD = dyn_cast<UnresolvedUsingIfExistsDecl>(FirstDecl)) {
+ DiagnoseUseOfDecl(EmptyD, NameLoc);
+ return NameClassification::Error();
----------------
================
Comment at: clang/lib/Sema/SemaExpr.cpp:3175
+ ValueDecl *VD = cast<ValueDecl>(D);
+
----------------
`auto *VD = cast<ValueDecl>(D);`
================
Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1704-1707
+void ASTDeclReader::VisitUnresolvedUsingIfExistsDecl(
+ UnresolvedUsingIfExistsDecl *D) {
+ VisitNamedDecl(D);
+}
----------------
I'm not super familiar with this code, but is this change actually necessary? I would have expected this to be handled via `VisitNamedDecl` by virtue of `UnresolvedUsingIfExistsDecl` inheriting from `NamedDecl`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90188/new/
https://reviews.llvm.org/D90188
More information about the cfe-commits
mailing list