<div dir="ltr">Thank you!</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 10, 2016 at 2:22 PM, Richard Smith via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rsmith<br>
Date: Thu Mar 10 13:22:21 2016<br>
New Revision: 263155<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=263155&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=263155&view=rev</a><br>
Log:<br>
Add test for r263138.<br>
<br>
Added:<br>
cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-off-by-default.cpp<br>
<br>
Added: cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-off-by-default.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-off-by-default.cpp?rev=263155&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-off-by-default.cpp?rev=263155&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-off-by-default.cpp (added)<br>
+++ cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-off-by-default.cpp Thu Mar 10 13:22:21 2016<br>
@@ -0,0 +1,13 @@<br>
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -DUNREACHABLE=1 %s<br>
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -DUNREACHABLE=0 -Wimplicit-fallthrough %s<br>
+<br>
+void fallthrough(int n) {<br>
+ switch (n) {<br>
+ case 1:<br>
+ if (UNREACHABLE)<br>
+ return;<br>
+ [[fallthrough]]; // expected-no-diagnostics, only checked when UNREACHABLE=0<br>
+ case 2:<br>
+ break;<br>
+ }<br>
+}<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>