[PATCH] D54349: [clang-tidy] new check 'readability-redundant-pp'

Miklos Vajna via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 9 13:44:31 PST 2018

vmiklos added a comment.

In https://reviews.llvm.org/D54349#1293622, @lebedev.ri wrote:

> No one will know for sure what "pp" in "readability-redundant-pp" means.
>  I'd highly recommend to fully spell it out.

Will do.

> Also, i'd like to see some analysis of the false-positives.

Things I considered:

- header guards would easily generate "nested ifndef" false positives, so I limited the check to the main file only

- if there are nested `#ifdef FOO` .. `#endif` blocks, but FOO is not defined, we fail to detect the redundancy.

- I read that in general checks should be careful around templates and macros, but given this deals with the preprocessor, I don't expect issues there.

This implicitly means that I'm not aware of actual false positives of the check in its current form.

  rCTE Clang Tools Extra


More information about the cfe-commits mailing list