aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-11 16:29:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-11 16:29:35 +0000
commit46faa67da1d7e9450e8fa363f6633e2c68e33ff1 (patch)
treeba7f8dbcd8358d07c15d1da6c2c2cc38f0febeb6 /lib/Sema/SemaExprCXX.cpp
parent874094833caedbee43fd17cca164dec53d500bdc (diff)
downloadsrc-46faa67da1d7e9450e8fa363f6633e2c68e33ff1.tar.gz
src-46faa67da1d7e9450e8fa363f6633e2c68e33ff1.zip
Vendor import of clang release_70 branch r339355:vendor/clang/clang-release_70-r339355
Notes
Notes: svn path=/vendor/clang/dist-release_70/; revision=337633 svn path=/vendor/clang/clang-release_70-r339355/; revision=337634; tag=vendor/clang/clang-release_70-r339355
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index a1168fa34d56..7a8f2d3f4702 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -113,9 +113,15 @@ ParsedType Sema::getConstructorName(IdentifierInfo &II,
break;
}
}
- if (!InjectedClassName && CurClass->isInvalidDecl())
+ if (!InjectedClassName) {
+ if (!CurClass->isInvalidDecl()) {
+ // FIXME: RequireCompleteDeclContext doesn't check dependent contexts
+ // properly. Work around it here for now.
+ Diag(SS.getLastQualifierNameLoc(),
+ diag::err_incomplete_nested_name_spec) << CurClass << SS.getRange();
+ }
return ParsedType();
- assert(InjectedClassName && "couldn't find injected class name");
+ }
QualType T = Context.getTypeDeclType(InjectedClassName);
DiagnoseUseOfDecl(InjectedClassName, NameLoc);