diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-16 21:36:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-16 21:36:18 +0000 |
commit | 7bdc15252ca2415f149ad812f0e5184d758e6105 (patch) | |
tree | de57648d4ffa3cc9fba145b8ce1929e3f0df8be8 /lib/Sema/SemaExpr.cpp | |
parent | 449d4f06fe7501ed53e3aaaa465a499442285e90 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 6b66a42ad3..5202f96354 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/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()) |