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
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 7e41bcc..936604e 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -511,7 +511,7 @@
 
   // 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()) {