[PATCH] D21470: [clang-tidy] Don't run misc-definitions-in-headers check in failing TUs.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 17 07:13:25 PDT 2016
hokein created this revision.
hokein added a reviewer: alexfh.
hokein added a subscriber: cfe-commits.
http://reviews.llvm.org/D21470
Files:
clang-tidy/misc/DefinitionsInHeadersCheck.cpp
Index: clang-tidy/misc/DefinitionsInHeadersCheck.cpp
===================================================================
--- clang-tidy/misc/DefinitionsInHeadersCheck.cpp
+++ clang-tidy/misc/DefinitionsInHeadersCheck.cpp
@@ -72,6 +72,10 @@
}
void DefinitionsInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
+ // Don't run the check in failing TUs.
+ if (Result.Context->getDiagnostics().hasErrorOccurred())
+ return;
+
// C++ [basic.def.odr] p6:
// There can be more than one definition of a class type, enumeration type,
// inline function with external linkage, class template, non-static function
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21470.61092.patch
Type: text/x-patch
Size: 633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160617/583ec123/attachment.bin>
More information about the cfe-commits
mailing list