2011-01-07 02:45:19 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wno-deprecated-writable-strings -verify %s
|
2011-03-15 00:13:32 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -fwritable-strings -verify %s
|
2011-04-23 14:54:44 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wno-write-strings -verify %s
|
2013-11-15 06:22:31 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Werror=c++11-compat -verify %s -DERROR
|
2011-01-07 02:45:19 +08:00
|
|
|
// rdar://8827606
|
|
|
|
|
|
|
|
char *fun(void)
|
|
|
|
{
|
|
|
|
return "foo";
|
2013-11-15 06:22:31 +08:00
|
|
|
#ifdef ERROR
|
|
|
|
// expected-error@-2 {{deprecated}}
|
|
|
|
#endif
|
2011-01-07 02:45:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void test(bool b)
|
|
|
|
{
|
|
|
|
++b; // expected-warning {{incrementing expression of type bool is deprecated}}
|
|
|
|
}
|