From: Chris Lattner Date: Thu, 31 Jan 2008 06:06:29 +0000 (+0000) Subject: Fix a bogus test X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=868d08f9e97eb013600199594745b9997150be8f;p=clang Fix a bogus test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46602 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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}} }