================
@@ -0,0 +1,107 @@
+// RUN: %clang_cc1 -fsyntax-only %s -verify
+
+[[noreturn]] extern void noret();
+[[noreturn]] extern void noret2();
+extern void ordinary();
+
+typedef void (*func_type)(void);
+
----------------
AaronBallman wrote:

Another test case that would be good to add:
```
[[noreturn void func(void (*fp)() = noret) {
  fp();
}
```
This should diagnose still because there's no reason to presume the default 
argument is actually being used. Same if `fp` is a `const` pointer to function.

https://github.com/llvm/llvm-project/pull/144408
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to