aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-05-20 09:10:20 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-05-20 09:10:20 +0000
commit6e33dd5b5cbaddadd54bebe07c8397844365d885 (patch)
tree3b636e9c6d51a972cb15a4b29b5dcf03ef5edd98 /lib/Parse/Parser.cpp
parenta8ea76a45a8771245e70e9b603eac8d9df1bcfad (diff)
Fix the scope of K&R-style argument declarations so that they don't
extend beyond the end of the function. I'm not completely sure this is the right way to fix this bug, so someone familiar with the parser should double-check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r--lib/Parse/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 7e41bcc92e..936604e870 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -511,7 +511,7 @@ void Parser::ParseKNRParamDeclarations(Declarator &D) {
// Enter function-declaration scope, limiting any declarators to the
// function prototype scope, including parameter declarators.
- EnterScope(Scope::DeclScope);
+ EnterScope(Scope::FnScope|Scope::DeclScope);
// Read all the argument declarations.
while (isDeclarationSpecifier()) {