summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-16 21:36:18 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-16 21:36:18 +0000
commita86bc00d3efa6a92d5f78e052562cc0f8d4b6f6a (patch)
tree5a21877da35a7d218432968b929458672aaa8690 /clang/lib/Sema/SemaExpr.cpp
parent4fa6aec9fe5b3ea6571b7455d9d77efc18495d67 (diff)
downloadbcm5719-llvm-a86bc00d3efa6a92d5f78e052562cc0f8d4b6f6a.tar.gz
bcm5719-llvm-a86bc00d3efa6a92d5f78e052562cc0f8d4b6f6a.zip
Lambda closure types are always considered to be like "local" classes,
even if they are not within a function scope. Teach template instantiation to treat them as such, and make sure that we have a local instantiation scope when instantiating default arguments and static data members. llvm-svn: 150725
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 6b66a42ad34..5202f96354d 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -3128,6 +3128,7 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc,
// the semantic constraints are checked, at the point where the
// default argument expression appears.
ContextRAII SavedContext(*this, FD);
+ LocalInstantiationScope Local(*this);
Result = SubstExpr(UninstExpr, ArgList);
}
if (Result.isInvalid())
OpenPOWER on IntegriCloud