diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 173a4f43a911175643bda81ee675e8d9269056ea (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /test/SemaCXX/writable-strings-deprecated.cpp | |
parent | 88f7a7d5251a2d813460274c92decc143a11569b (diff) | |
download | FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.zip FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.tar.gz |
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_350/final@216957
Diffstat (limited to 'test/SemaCXX/writable-strings-deprecated.cpp')
-rw-r--r-- | test/SemaCXX/writable-strings-deprecated.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/SemaCXX/writable-strings-deprecated.cpp b/test/SemaCXX/writable-strings-deprecated.cpp index b8f605b..f925833 100644 --- a/test/SemaCXX/writable-strings-deprecated.cpp +++ b/test/SemaCXX/writable-strings-deprecated.cpp @@ -1,14 +1,25 @@ // RUN: %clang_cc1 -fsyntax-only -Wno-deprecated-writable-strings -verify %s +// RUN: %clang_cc1 -fsyntax-only -Wno-deprecated -Wdeprecated-increment-bool -verify %s // RUN: %clang_cc1 -fsyntax-only -fwritable-strings -verify %s // RUN: %clang_cc1 -fsyntax-only -Wno-write-strings -verify %s // RUN: %clang_cc1 -fsyntax-only -Werror=c++11-compat -verify %s -DERROR +// RUN: %clang_cc1 -fsyntax-only -Werror=deprecated -Wno-error=deprecated-increment-bool -verify %s -DERROR +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s -Wno-deprecated -Wdeprecated-increment-bool +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s -pedantic-errors -DERROR // rdar://8827606 char *fun(void) { return "foo"; +#if __cplusplus >= 201103L #ifdef ERROR - // expected-error@-2 {{deprecated}} + // expected-error@-3 {{ISO C++11 does not allow conversion from string literal to 'char *'}} +#else + // expected-warning@-5 {{ISO C++11 does not allow conversion from string literal to 'char *'}} +#endif +#elif defined(ERROR) + // expected-error@-8 {{deprecated}} #endif } |