summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-21 00:37:24 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-21 00:37:24 +0000
commit7fcbd902b49f1776cd514e8e0056a159d46f5a01 (patch)
treeedbe156c3e8674ade1c87af0595173871feb4d17 /clang/lib/Sema/Sema.cpp
parent45062046405c649c9b493f0f2abb04c6bdcba368 (diff)
downloadbcm5719-llvm-7fcbd902b49f1776cd514e8e0056a159d46f5a01.tar.gz
bcm5719-llvm-7fcbd902b49f1776cd514e8e0056a159d46f5a01.zip
Implement name mangling for lambda expressions that occur within the
default arguments of function parameters. This simple-sounding task is complicated greatly by two issues: (1) Default arguments aren't actually a real context, so we need to maintain extra state within lambda expressions to track when a lambda was actually in a default argument. (2) At the time that we parse a default argument, the FunctionDecl doesn't exist yet, so lambda closure types end up in the enclosing context. It's not clear that we ever want to change that, so instead we introduce the notion of the "effective" context of a declaration for the purposes of name mangling. llvm-svn: 151011
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 716ffd131b2..6a83518bc02 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -111,7 +111,7 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
&Context);
ExprEvalContexts.push_back(
- ExpressionEvaluationContextRecord(PotentiallyEvaluated, 0, false));
+ ExpressionEvaluationContextRecord(PotentiallyEvaluated, 0, false, 0));
FunctionScopes.push_back(new FunctionScopeInfo(Diags));
}
OpenPOWER on IntegriCloud