[PATCH] Don't emit diagnostics for system headers.
Alexander Kornienko
alexfh at google.com
Wed Jan 8 07:26:31 PST 2014
================
Comment at: clang-tidy/ClangTidyDiagnosticConsumer.h:121-122
@@ +120,4 @@
+ // from non-user code.
+ if (Diags->getSourceManager().getFileCharacteristic(Info.getLocation()) !=
+ SrcMgr::C_User)
+ return;
----------------
Daniel Jasper wrote:
> I think you could/should use:
>
> Diags->getSourceManager().isInSystemHeader(Info.getLocation())
Nice. I missed this method somehow, when I was looking for a way to check for system headers.
http://llvm-reviews.chandlerc.com/D2519
BRANCH
svn
ARCANIST PROJECT
clang-tools-extra
More information about the cfe-commits
mailing list