[cfe-dev] clang-tidy how to exclude header from being preprocessed -- NOLINT not working

Oza, Hiral via cfe-dev cfe-dev at lists.llvm.org
Thu May 3 01:47:27 PDT 2018


Greetings!

How to exclude #include-ed header files while running clang-tidy? Tried '// NOLINT' and '// NOLINTNEXTLINE' but it didn't help!!!

Sample program:
a.h:
01 #include <inc1.h>
02 #include <inc2.h>
03 #include "inc3.h>
// other code

a.c:
01 #include <a.h> // NOLINT
// other code

With above sample, I want to skip tidy-ing a.h and I tried placing '// NOLINT' but tidy is still parsing a.h.
I also tried with '// NOLINTNEXTLINE' but still tidy is considering a.c:01 line and impacts the overall performance.

Thanks,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180503/ce0afc04/attachment.html>


More information about the cfe-dev mailing list