summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/c89.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-05 06:32:51 +0000
committerChris Lattner <sabre@nondot.org>2008-04-05 06:32:51 +0000
commit9d51f2b9d44563a57aae5e5989c80dda8cde1d58 (patch)
tree745bf6d782d5106853716d53d1cf25c76ed63a59 /clang/test/Sema/c89.c
parent94fc8063b4e4635bd18ea2b9cf76b4a71685b5ca (diff)
downloadbcm5719-llvm-9d51f2b9d44563a57aae5e5989c80dda8cde1d58.tar.gz
bcm5719-llvm-9d51f2b9d44563a57aae5e5989c80dda8cde1d58.zip
Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999. llvm-svn: 49251
Diffstat (limited to 'clang/test/Sema/c89.c')
-rw-r--r--clang/test/Sema/c89.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/Sema/c89.c b/clang/test/Sema/c89.c
index 301ec374db3..6a12f1cc568 100644
--- a/clang/test/Sema/c89.c
+++ b/clang/test/Sema/c89.c
@@ -36,6 +36,14 @@ int *__restrict; /* expected-error {{expected identifier}} */
/* Implicit int, always ok */
-foo() {}
+test6() {}
+
+/* PR2012 */
+test7; /* expected-warning {{declaration specifier missing, defaulting to 'int'}} */
+
+void test8(int, x); /* expected-warning {{declaration specifier missing, defaulting to 'int'}} */
+
+typedef int sometype;
+int a(sometype, y) {return 0;} /* expected-warning {{declaration specifier missing, defaulting to 'int'}} */
OpenPOWER on IntegriCloud