lebedev.ri added a comment. How about also matching on call to functions with no-return attribute? i.e.
[[noreturn]] my_die();
void do_stuff();
void fn(int x) {
if(!x)
my_die();
else // <- since `my_die()` will never return, `else` is not really needed.
do_stuff();
}
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D40505
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
