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
// 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()) {
--- /dev/null
+// RUN: clang -fsyntax-only %s -verify
+
+x(a) int a; {return a;}
+y(b) int b; {return a;} // expected-error {{use of undeclared identifier}}
+