diff options
| author | Charles Li <charles_li@playstation.sony.com> | 2016-04-14 23:47:07 +0000 |
|---|---|---|
| committer | Charles Li <charles_li@playstation.sony.com> | 2016-04-14 23:47:07 +0000 |
| commit | 1a88adbb27a21e7728253c2f932b41009e314985 (patch) | |
| tree | 7dafdd87f8d899c1dd638dcd2bc171df4ad58706 /clang/test/SemaCXX/warn-unused-value.cpp | |
| parent | 4960fbf391360ae04c5815fca2fd647567a977f3 (diff) | |
| download | bcm5719-llvm-1a88adbb27a21e7728253c2f932b41009e314985.tar.gz bcm5719-llvm-1a88adbb27a21e7728253c2f932b41009e314985.zip | |
Lit C++11 Compatibility Patch #8
24 tests have been updated for C++11 compatibility.
llvm-svn: 266387
Diffstat (limited to 'clang/test/SemaCXX/warn-unused-value.cpp')
| -rw-r--r-- | clang/test/SemaCXX/warn-unused-value.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/warn-unused-value.cpp b/clang/test/SemaCXX/warn-unused-value.cpp index efabd506306..d6ec0fb5d1c 100644 --- a/clang/test/SemaCXX/warn-unused-value.cpp +++ b/clang/test/SemaCXX/warn-unused-value.cpp @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify -Wunused-value %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wunused-value -std=c++98 %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wunused-value -std=c++11 %s // PR4806 namespace test0 { @@ -12,7 +14,10 @@ namespace test0 { // pointer to volatile has side effect (thus no warning) Box* box = new Box; box->i; // expected-warning {{expression result unused}} - box->j; // expected-warning {{expression result unused}} + box->j; +#if __cplusplus <= 199711L + // expected-warning@-2 {{expression result unused}} +#endif } } |

