[cfe-commits] r46602 - in /cfe/trunk/test/Sema: function.c return-stack-addr.cpp

Chris Lattner sabre at nondot.org
Wed Jan 30 22:06:30 PST 2008


Author: lattner
Date: Thu Jan 31 00:06:29 2008
New Revision: 46602

URL: http://llvm.org/viewvc/llvm-project?rev=46602&view=rev
Log:
Fix a bogus test

Modified:
    cfe/trunk/test/Sema/function.c
    cfe/trunk/test/Sema/return-stack-addr.cpp

Modified: cfe/trunk/test/Sema/function.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/function.c?rev=46602&r1=46601&r2=46602&view=diff

==============================================================================
--- cfe/trunk/test/Sema/function.c (original)
+++ cfe/trunk/test/Sema/function.c Thu Jan 31 00:06:29 2008
@@ -13,3 +13,13 @@
 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}}
+
+

Modified: cfe/trunk/test/Sema/return-stack-addr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/return-stack-addr.cpp?rev=46602&r1=46601&r2=46602&view=diff

==============================================================================
--- cfe/trunk/test/Sema/return-stack-addr.cpp (original)
+++ cfe/trunk/test/Sema/return-stack-addr.cpp Thu Jan 31 00:06:29 2008
@@ -105,7 +105,7 @@
   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}}
 }
 





More information about the cfe-commits mailing list