]> granicus.if.org Git - clang/commitdiff
Fix a bogus test
authorChris Lattner <sabre@nondot.org>
Thu, 31 Jan 2008 06:06:29 +0000 (06:06 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 31 Jan 2008 06:06:29 +0000 (06:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46602 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/function.c
test/Sema/return-stack-addr.cpp

index 17cc86ef13879ebb4cce5fe23c1e796eba910f30..7e593d400c905ebaa9774cdf372db1c9e6b84b85 100644 (file)
@@ -13,3 +13,13 @@ void g(int (*)(const void **, const void **));
 void g(int (*compar)()) {
 }
 
+
+// PR1965
+int t5(b);          // expected-error {{parameter list without types}}
+int t6(int x, g);   // expected-error {{type specifier required for parameter 'g'}}
+
+int t7(, );       // expected-error {{type specifier required}} expected-error {{type specifier required}}
+int t8(, int a);  // expected-error {{type specifier required}}
+int t9(int a, );  // expected-error {{type specifier required}}
+
+
index 5506f2fe86f4f4505d72e8d75554f3d5b29c9366..c7d1a7f3d6b198a75ffa6990a06ea57d1b7b9d88 100644 (file)
@@ -105,7 +105,7 @@ int* ret_cpp_reinterpret_cast_no_warning(double x) {
   return reinterpret_cast<int*>(x); // no-warning
 }
 
-int* ret_cpp_const_cast(const x) {
+int* ret_cpp_const_cast(const int x) {
   return const_cast<int*>(&x);  // expected-warning {{address of stack memory}}
 }