[PATCH] D40505: [clang-tidy] Ignore ExprWithCleanups when looking for else-after-throw
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 27 09:59:18 PST 2017
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
More information about the cfe-commits
mailing list