[PATCH] D105951: [clang] P2266 implicit moves STL workaround
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 14 11:15:19 PDT 2021
aaron.ballman added a comment.
Thank you for working on this! We're testing the patch out internally to see if it solves issues for us with some of the failures we're seeing.
================
Comment at: clang/lib/Sema/SemaStmt.cpp:3314
+ return false;
+ const Decl *D = E.getReferencedDeclOfCallee();
+ if (!S.SourceMgr.isInSystemHeader(D->getLocation()))
----------------
This can return `nullptr`, so we should probably return `false` in that case; WDYT?
================
Comment at: clang/lib/Sema/SemaStmt.cpp:3317-3321
+ for (const DeclContext *DC = D->getDeclContext(); DC; DC = DC->getParent()) {
+ if (const auto *NS = dyn_cast<NamespaceDecl>(DC))
+ if (NS->isStdNamespace())
+ return true;
+ }
----------------
Can you use `D->isInStdNamespace()` instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105951/new/
https://reviews.llvm.org/D105951
More information about the cfe-commits
mailing list