summaryrefslogtreecommitdiffstats
path: root/clang/test
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/test
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/test')
-rw-r--r--clang/test/Parser/traditional_arg_scope.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Parser/traditional_arg_scope.c b/clang/test/Parser/traditional_arg_scope.c
new file mode 100644
index 00000000000..222de863fba
--- /dev/null
+++ b/clang/test/Parser/traditional_arg_scope.c
@@ -0,0 +1,5 @@
+// RUN: clang -fsyntax-only %s -verify
+
+x(a) int a; {return a;}
+y(b) int b; {return a;} // expected-error {{use of undeclared identifier}}
+
OpenPOWER on IntegriCloud