summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-11-20 22:56:34 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-11-20 22:56:34 +0000
commit069ecf65e55ce1cede1bfcaca7a35d6513072821 (patch)
tree8bfaf5408e2d6aed37bffe2248ea3fcf4b7235db /clang/lib/Sema
parentfee89e43adf3c5fb60e48a0cb22f236323b9b432 (diff)
downloadbcm5719-llvm-069ecf65e55ce1cede1bfcaca7a35d6513072821.tar.gz
bcm5719-llvm-069ecf65e55ce1cede1bfcaca7a35d6513072821.zip
Fix crash-on-valid if a lambda-expression appears lexically directly within a
local class inside a template. llvm-svn: 222476
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiate.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 891cf734c36..c05960b5712 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -2555,7 +2555,10 @@ Sema::InstantiateClassMembers(SourceLocation PointOfInstantiation,
// Always skip the injected-class-name, along with any
// redeclarations of nested classes, since both would cause us
// to try to instantiate the members of a class twice.
- if (Record->isInjectedClassName() || Record->getPreviousDecl())
+ // Skip closure types; they'll get instantiated when we instantiate
+ // the corresponding lambda-expression.
+ if (Record->isInjectedClassName() || Record->getPreviousDecl() ||
+ Record->isLambda())
continue;
MemberSpecializationInfo *MSInfo = Record->getMemberSpecializationInfo();
OpenPOWER on IntegriCloud