summaryrefslogtreecommitdiffstats
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2013-11-12 01:40:44 +0000
committerFaisal Vali <faisalv@yahoo.com>2013-11-12 01:40:44 +0000
commitd78d6591fa2556b037d3571fde3631d0243c08d7 (patch)
tree4c9a1705b5b48a7373f35f2635933c1b1623085d /lib/Sema/Sema.cpp
parent537b8a8b4277c8dba6c29e7582acde72a0578bdc (diff)
REFACTOR: Have PushLambdaScope return the LambdaScopeInfo that it creates.
No Functionality change. This refactoring avoids having to call getCurLambda right after PushLambdaScope, to obtain the LambdaScopeInfo that was created during the call to PushLambdaScope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 41f72a68a3..6fe9fb58db 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -1029,8 +1029,10 @@ void Sema::PushBlockScope(Scope *BlockScope, BlockDecl *Block) {
BlockScope, Block));
}
-void Sema::PushLambdaScope() {
- FunctionScopes.push_back(new LambdaScopeInfo(getDiagnostics()));
+LambdaScopeInfo* Sema::PushLambdaScope() {
+ LambdaScopeInfo *const LSI = new LambdaScopeInfo(getDiagnostics());
+ FunctionScopes.push_back(LSI);
+ return LSI;
}
void Sema::RecordParsingTemplateParameterDepth(unsigned Depth) {