diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-02-16 22:27:01 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-02-16 22:27:01 +0000 |
commit | f931a3896ed409b890ee573a947af1b8db9109af (patch) | |
tree | 3d1bc5c7282605ff573571a06921c66c6c5151b0 /clang/test/SemaCXX/for-range-examples.cpp | |
parent | 9c8d77794bae4af323898c7f22cc9c09391b9a47 (diff) | |
download | bcm5719-llvm-f931a3896ed409b890ee573a947af1b8db9109af.tar.gz bcm5719-llvm-f931a3896ed409b890ee573a947af1b8db9109af.zip |
Sema: diagnose use of unscoped deprecated prior to C++14
The deprecated attribute was adopted as part of the C++14, however, there is a
GNU version available in C++11. When using C++ earlier than C++14, diagnose the
use of the attribute without the GNU scope, but only when using the generalised
attribute syntax.
llvm-svn: 229447
Diffstat (limited to 'clang/test/SemaCXX/for-range-examples.cpp')
-rw-r--r-- | clang/test/SemaCXX/for-range-examples.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/for-range-examples.cpp b/clang/test/SemaCXX/for-range-examples.cpp index d07331c51e2..f2b155ad7e5 100644 --- a/clang/test/SemaCXX/for-range-examples.cpp +++ b/clang/test/SemaCXX/for-range-examples.cpp @@ -226,7 +226,7 @@ namespace test7 { // we check the alignment attribute before we perform the auto // deduction. for (d alignas(1) : arr) {} // expected-error {{requires type for loop variable}} - for (e [[deprecated]] : arr) { e = 0; } // expected-warning {{deprecated}} expected-note {{here}} expected-error {{requires type for loop variable}} + for (e [[deprecated]] : arr) { e = 0; } // expected-warning{{use of the deprecated attribute is a C++14 extension}} expected-warning {{deprecated}} expected-note {{here}} expected-error {{requires type for loop variable}} } } |