================
@@ -438,3 +438,15 @@ void testLabels(bool b) {
f(0);
}
}
+
+[[noreturn]] void noReturn();
+
+void testNoReturn() {
+ if (true) {
+ noReturn();
+ } else { // comment-28
+ // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: do not use 'else' after
'noreturn'
+ // CHECK-FIXES: {{^}} } // comment-28
+ f(0);
+ }
+}
----------------
localspook wrote:
Can we add a test with a member function marked `[[noreturn]]`?
https://github.com/llvm/llvm-project/pull/185202
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits