aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-02-01 04:49:10 +0000
committerDouglas Gregor <dgregor@apple.com>2013-02-01 04:49:10 +0000
commit10318845f40d50b9d0ce010b0ea8d93a7b5ab029 (patch)
treef13abf878dfda4333d72304b6da827138b6e5a9c /lib/Sema/SemaDeclCXX.cpp
parent199402b9e081dedc28e19ab6e727470b34f2f64d (diff)
Don't do delayed exception-specification checking on an invalid
class. Fixes <rdar://problem/13017229>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 9ef91467da..ead7b6548b 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -7871,6 +7871,14 @@ void Sema::DefineImplicitDestructor(SourceLocation CurrentLocation,
/// \brief Perform any semantic analysis which needs to be delayed until all
/// pending class member declarations have been parsed.
void Sema::ActOnFinishCXXMemberDecls() {
+ // If the context is an invalid C++ class, just suppress these checks.
+ if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(CurContext)) {
+ if (Record->isInvalidDecl()) {
+ DelayedDestructorExceptionSpecChecks.clear();
+ return;
+ }
+ }
+
// Perform any deferred checking of exception specifications for virtual
// destructors.
for (unsigned i = 0, e = DelayedDestructorExceptionSpecChecks.size();