summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index db47931348..8dd9c19bd3 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -113,6 +113,8 @@ ParsedType Sema::getConstructorName(IdentifierInfo &II,
break;
}
}
+ if (!InjectedClassName && CurClass->isInvalidDecl())
+ return ParsedType();
assert(InjectedClassName && "couldn't find injected class name");
QualType T = Context.getTypeDeclType(InjectedClassName);