Re: [cfe-users] -Winvalid-noreturn warning

2022-01-06 Thread David Blaikie via cfe-users
FWIW, GCC does warn on similar code - the reason it doesn't warn here is that the function is `inline` and never called, so GCC probably never analyses it (I pasted your code here and added a few cases to demonstrate GCC's quirks compared to Clang's here: https://godbolt.org/z/YM9q91bx1 ) So far a

[cfe-users] -Winvalid-noreturn warning

2022-01-06 Thread Manu agarwal via cfe-users
Hi, We have the below code where this warning gets generated. #include [[noreturn]] inline void abc () noexcept { std::terminate (); } using MyNoReturn = void (*) () noexcept; //using MyNoReturn = std::add_pointer_t;// even this declaration, instead of the above, gives the same wa