diff --git a/test/Sema/function.c b/test/Sema/function.c index 17cc86ef13..7e593d400c 100644 --- a/test/Sema/function.c +++ b/test/Sema/function.c @@ -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}} + + diff --git a/test/Sema/return-stack-addr.cpp b/test/Sema/return-stack-addr.cpp index 5506f2fe86..c7d1a7f3d6 100644 --- a/test/Sema/return-stack-addr.cpp +++ b/test/Sema/return-stack-addr.cpp @@ -105,7 +105,7 @@ int* ret_cpp_reinterpret_cast_no_warning(double x) { return reinterpret_cast(x); // no-warning } -int* ret_cpp_const_cast(const x) { +int* ret_cpp_const_cast(const int x) { return const_cast(&x); // expected-warning {{address of stack memory}} }