summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2013-10-03 05:58:37 +0000
committerFaisal Vali <faisalv@yahoo.com>2013-10-03 05:58:37 +0000
commit10a00ee485a3225ac8d1296b33a22e7c2ca06837 (patch)
tree9b677a371d8b5c81d4d86be7a494a76753b1f8c4 /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
parentba78d3434744a26a3f330151548a4386f2ca3c1f (diff)
downloadbcm5719-llvm-10a00ee485a3225ac8d1296b33a22e7c2ca06837.tar.gz
bcm5719-llvm-10a00ee485a3225ac8d1296b33a22e7c2ca06837.zip
Revert changes from the nested lambdas commit till i figure out
why the buildbots are failing. llvm-svn: 191876
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 359fb73166d..35f3616db6a 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -4171,30 +4171,6 @@ DeclContext *Sema::FindInstantiatedContext(SourceLocation Loc, DeclContext* DC,
NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D,
const MultiLevelTemplateArgumentList &TemplateArgs) {
DeclContext *ParentDC = D->getDeclContext();
-
- // If we have a parameter from a non-dependent context with a non-dependent
- // type it obviously can not be mapped to a different instantiated decl.
- // Consider the code below, with explicit return types, when N gets
- // specialized ...:
- // template<class T> void fooT(T t) {
- // auto L = [](auto a) -> void {
- // auto M = [](char b) -> void {
- // auto N = [](auto c) -> void {
- // int x = sizeof(a) + sizeof(b) +
- // sizeof(c);
- // };
- // N('a');
- // };
- // };
- // L(3.14);
- // }
- // fooT('a');
- // ... without this check below, findInstantiationOf fails with
- // an assertion violation.
- if (isa<ParmVarDecl>(D) && !ParentDC->isDependentContext() &&
- !cast<ParmVarDecl>(D)->getType()->isInstantiationDependentType())
- return D;
-
if (isa<ParmVarDecl>(D) || isa<NonTypeTemplateParmDecl>(D) ||
isa<TemplateTypeParmDecl>(D) || isa<TemplateTemplateParmDecl>(D) ||
(ParentDC->isFunctionOrMethod() && ParentDC->isDependentContext()) ||
OpenPOWER on IntegriCloud