forked from OSchip/llvm-project
[clang-tidy] Don't run misc-definitions-in-headers check in failing TUs.
Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21470 llvm-svn: 273849
This commit is contained in:
parent
a45da385f8
commit
e5d277923a
|
@ -72,6 +72,10 @@ void DefinitionsInHeadersCheck::registerMatchers(MatchFinder *Finder) {
|
|||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue