summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit2460b0c9414c9bbee036312b3d99f81dd232a6f3 (patch)
tree06c4daeda07a0cc5b89142f9eac0355b94005537 /clang/lib
parentf77daf5e587727241a70345484a1c6c0aab8f31a (diff)
downloadbcm5719-llvm-2460b0c9414c9bbee036312b3d99f81dd232a6f3.tar.gz
bcm5719-llvm-2460b0c9414c9bbee036312b3d99f81dd232a6f3.zip
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. llvm-svn: 51311
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Parse/Parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index 7e41bcc92e3..936604e870b 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/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()) {
OpenPOWER on IntegriCloud