[PATCH] D86624: [clang] Exclude invalid destructors from lookups.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 26 07:57:57 PDT 2020
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/AST/DeclBase.cpp:1489
return true;
+ if (isa<CXXDestructorDecl>(D) && D->isInvalidDecl())
+ return true;
----------------
split into separate block, add a comment why
================
Comment at: clang/test/PCH/cxx-invalid-destructor.cpp:2
+// RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t %S/cxx-invalid-destructor.h -fallow-pch-with-compiler-errors
+// RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t %S/cxx-invalid-destructor.cpp -fsyntax-only -fno-validate-pch
+
----------------
nit: -fno-validate-pch shouldn't be needed IIUC
================
Comment at: clang/test/PCH/cxx-invalid-destructor.h:6
+
+class Bar {
+public:
----------------
nit: we can eliminate Bar I think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86624/new/
https://reviews.llvm.org/D86624
More information about the cfe-commits
mailing list