[PATCH] Fix "warning: fallthrough annotation does not directly precede switch label" in lambdas.

Alexander Kornienko alexfh at google.com
Mon Jun 23 13:22:12 PDT 2014

Comment at: test/SemaCXX/switch-implicit-fallthrough.cpp:285
@@ +284,3 @@
+int fallthrough_targets(int n) {
+  [[clang::fallthrough]]; // expected-error{{fallthrough annotation is outside switch statement}}
Reid Kleckner wrote:
> Why did this code have to move?  Aaron asked about it.
I've already answered on the list.
> Clang seems to stop producing warnings after the function containing errors, so the test with errors should be the last one (or maybe even in a separate file).


More information about the cfe-commits mailing list