This revision was automatically updated to reflect the committed changes. Closed by commit rL273849: [clang-tidy] Don't run misc-definitions-in-headers check in failing TUs. (authored by hokein).
Changed prior to commit: http://reviews.llvm.org/D21470?vs=61092&id=61938#toc Repository: rL LLVM http://reviews.llvm.org/D21470 Files: clang-tools-extra/trunk/clang-tidy/misc/DefinitionsInHeadersCheck.cpp Index: clang-tools-extra/trunk/clang-tidy/misc/DefinitionsInHeadersCheck.cpp =================================================================== --- clang-tools-extra/trunk/clang-tidy/misc/DefinitionsInHeadersCheck.cpp +++ clang-tools-extra/trunk/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
Index: clang-tools-extra/trunk/clang-tidy/misc/DefinitionsInHeadersCheck.cpp =================================================================== --- clang-tools-extra/trunk/clang-tidy/misc/DefinitionsInHeadersCheck.cpp +++ clang-tools-extra/trunk/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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits