Issue 146223
Summary False negative Wmissing-noreturn warning when a function always throws
Labels new issue
Assignees
Reporter TiborGY
    Unlike GCC, Clang's implementation of -Wmissing-noreturn does not fire when seeing a function that always throws:
```
void throwError(const std::string& msg){
	throw std::runtime_error(msg);
}
```
GCC 15.1 issues the following warning:
`warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]`

https://godbolt.org/z/nWPjxb377
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to