[PATCH] D41456: [clang-tidy] readability-else-after-return: also diagnose noreturn function calls.

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 20 10:14:07 PST 2017

lebedev.ri created this revision.
lebedev.ri added reviewers: aaron.ballman, alexfh, djasper, malcolm.parsons.
lebedev.ri added a project: clang-tools-extra.
Herald added a subscriber: xazax.hun.

The readability-else-after-return check was not warning about  an else after a call to the function that will not return. In particular, marker with a noreturn attribute, be it either C++11 `[[noreturn]]`, or the `__attribute__((noreturn))`.
This differential adds support to diagnose normal function calls, and calls to member functions; but not constructors, destructors and special member functions.

A follow-up for https://reviews.llvm.org/D40505.

  rCTE Clang Tools Extra



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41456.127754.patch
Type: text/x-patch
Size: 4492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171220/015d59c9/attachment-0001.bin>

More information about the cfe-commits mailing list