summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2016-12-16 03:19:41 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2016-12-16 03:19:41 +0000
commitd644e021b54ddf5d89d3e98c40a9e6337f7da185 (patch)
tree97a04182b2057adafe046805f12b8fbe62349286 /clang/lib/Sema/SemaTemplateInstantiate.cpp
parent3826727453b258ac8b6df655892497cbdd7dc5df (diff)
downloadbcm5719-llvm-d644e021b54ddf5d89d3e98c40a9e6337f7da185.tar.gz
bcm5719-llvm-d644e021b54ddf5d89d3e98c40a9e6337f7da185.zip
[Sema] Fix handling of enumerators used as default arguments of lambda
expressions in a function or class template. This patch makes the following changes: - Create a DependentScopeDeclRefExpr for the default argument instead of a CXXDependentScopeMemberExpr. - Pass CombineWithOuterScope=true so that the outer scope in which the enum is declared is searched for the instantiation of the enum. This is the first part of https://reviews.llvm.org/D23096. Fixes PR28795 rdar://problem/27535319 llvm-svn: 289914
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 321fd6995be..4e3862a14d6 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -1687,7 +1687,7 @@ ParmVarDecl *Sema::SubstParmVarDecl(ParmVarDecl *OldParm,
// Instantiate default arguments for methods of local classes (DR1484)
// and non-defining declarations.
Sema::ContextRAII SavedContext(*this, OwningFunc);
- LocalInstantiationScope Local(*this);
+ LocalInstantiationScope Local(*this, true);
ExprResult NewArg = SubstExpr(Arg, TemplateArgs);
if (NewArg.isUsable()) {
// It would be nice if we still had this.
OpenPOWER on IntegriCloud