summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/for-range-examples.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-03-08 00:32:55 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-03-08 00:32:55 +0000
commit4f902c7eccd47cc3e1d0ceebca3025406a2e5fa7 (patch)
treef4f111a17e5cb2aa89e7050bd5c8ef41e30bc2f2 /clang/test/SemaCXX/for-range-examples.cpp
parent12350a8e133caefd43d1bc1d18baa66ba5202a3d (diff)
downloadbcm5719-llvm-4f902c7eccd47cc3e1d0ceebca3025406a2e5fa7.tar.gz
bcm5719-llvm-4f902c7eccd47cc3e1d0ceebca3025406a2e5fa7.zip
P0188R1: add support for standard [[fallthrough]] attribute. This is almost
exactly the same as clang's existing [[clang::fallthrough]] attribute, which has been updated to have the same semantics. The one significant difference is that [[fallthrough]] is ill-formed if it's not used immediately before a switch label (even when -Wimplicit-fallthrough is disabled). To support that, we now build a CFG of any function that uses a '[[fallthrough]];' statement to check. In passing, fix some bugs with our support for statement attributes -- in particular, diagnose their use on declarations, rather than asserting. llvm-svn: 262881
Diffstat (limited to 'clang/test/SemaCXX/for-range-examples.cpp')
-rw-r--r--clang/test/SemaCXX/for-range-examples.cpp2
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 9359ae63a60..83023e31101 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{{use of the 'deprecated' attribute is a C++14 extension}} expected-warning {{deprecated}} expected-note {{here}} 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}}
}
}
OpenPOWER on IntegriCloud