diff options
author | Alexander Kornienko <alexfh@google.com> | 2016-12-30 13:25:03 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2016-12-30 13:25:03 +0000 |
commit | 56d0806644f37abc26d5ea9abf91114e52cd3fa7 (patch) | |
tree | d345574615cbb17d75ae0291cb36065f4934e082 /clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp | |
parent | 03226c5e0632268ffc778414ecb421fccead4367 (diff) | |
download | bcm5719-llvm-56d0806644f37abc26d5ea9abf91114e52cd3fa7.tar.gz bcm5719-llvm-56d0806644f37abc26d5ea9abf91114e52cd3fa7.zip |
[clang-tidy] google-explicit-constructor: ignore template instantiations
llvm-svn: 290753
Diffstat (limited to 'clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp b/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp index 1257d100d3d..1605626d142 100644 --- a/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp +++ b/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp @@ -27,8 +27,10 @@ void ExplicitConstructorCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher(cxxConstructorDecl(unless(isInstantiated())).bind("ctor"), this); Finder->addMatcher( - cxxConversionDecl(unless(isExplicit()), // Already marked explicit. - unless(isImplicit())) // Compiler-generated. + cxxConversionDecl(unless(anyOf(isExplicit(), // Already marked explicit. + isImplicit(), // Compiler-generated. + isInstantiated()))) + .bind("conversion"), this); } |