forked from OSchip/llvm-project
parent
4cd6689d1f
commit
4973fb9273
|
@ -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}}
|
||||
|
||||
|
||||
|
|
|
@ -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}}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue