summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-10 06:34:36 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-10 06:34:36 +0000
commit7307d6ca967edef535f2a9d2d3d25bb5ab14d90e (patch)
treee88e5be63348093bba99432a2fef371d5619dc98 /clang/lib/Parse/ParseDecl.cpp
parent4637c3c6988d47600d556dbb51d87b48cbd7d5cf (diff)
downloadbcm5719-llvm-7307d6ca967edef535f2a9d2d3d25bb5ab14d90e.tar.gz
bcm5719-llvm-7307d6ca967edef535f2a9d2d3d25bb5ab14d90e.zip
Use a scoped object to manage entry/exit from a parser scope rather than explicitly calling EnterScope/ExitScope
llvm-svn: 60830
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index e7f4fc92ead..572ca613e01 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -1728,7 +1728,7 @@ void Parser::ParseFunctionDeclarator(SourceLocation LParenLoc, Declarator &D,
// Enter function-declaration scope, limiting any declarators to the
// function prototype scope, including parameter declarators.
- EnterScope(Scope::FnScope|Scope::DeclScope);
+ ParseScope PrototypeScope(this, Scope::FnScope|Scope::DeclScope);
bool IsVariadic = false;
while (1) {
@@ -1818,7 +1818,7 @@ void Parser::ParseFunctionDeclarator(SourceLocation LParenLoc, Declarator &D,
}
// Leave prototype scope.
- ExitScope();
+ PrototypeScope.Exit();
// If we have the closing ')', eat it.
MatchRHSPunctuation(tok::r_paren, LParenLoc);
OpenPOWER on IntegriCloud