Page MenuHomePhabricator

[clang-tidy] fix for NOLINT after macro expansion

Authored by mgehre on Sep 22 2016, 2:36 PM.



When having

#define MACRO code-with-warning

clang-tidy would still show the warning, because
it searched for "NOLINT" only in the first line,
not on the second.
This caused e.g.
(where the macro was defined in a system header). See also
the added test cases.
Now clang-tidy looks at the line of macro invocation and every line
of macro definition for a NOLINT comment.

Diff Detail

Event Timeline

mgehre updated this revision to Diff 72214.Sep 22 2016, 2:36 PM
mgehre retitled this revision from to [clang-tidy] fix for NOLINT after macro expansion.
mgehre updated this object.
mgehre added reviewers: alexfh, aaron.ballman, hokein.
mgehre added a subscriber: cfe-commits.
mgehre updated this object.Sep 22 2016, 2:37 PM
alexfh accepted this revision.Sep 23 2016, 7:13 PM
alexfh edited edge metadata.

Awesome, thanks!


Just return false;?

This revision is now accepted and ready to land.Sep 23 2016, 7:13 PM
This revision was automatically updated to reflect the committed changes.