HomePhabricator

[clang-tidy] fix for NOLINT after macro expansion

Description

[clang-tidy] fix for NOLINT after macro expansion

Summary:
When having

c++
   #define MACRO code-with-warning
   MACRO; // NOLINT

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. https://llvm.org/bugs/show_bug.cgi?id=29089
(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.

Reviewers: alexfh, aaron.ballman, hokein

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D24845

Details

Committed
mgehreSep 24 2016, 9:06 AM
Differential Revision
D24845: [clang-tidy] fix for NOLINT after macro expansion
Branches
Unknown
Tags
Unknown