This revision was automatically updated to reflect the committed changes.
Closed by commit rL282330: [clang-tidy] fix for NOLINT after macro expansion
(authored by mgehre).
Changed prior to commit:
https://reviews.llvm.org/D24845?vs=72214&id=72391#toc
Repository:
rL LLVM
https://reviews.llv
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
Awesome, thanks!
Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:303
@@ +302,3 @@
+if (!Loc.isMacroID())
+ break;
+Loc = SM.getImmediateExpansionRange(Loc)
mgehre created this revision.
mgehre added reviewers: alexfh, aaron.ballman, hokein.
mgehre added a subscriber: cfe-commits.
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