diff options
author | Alexander Kornienko <alexfh@google.com> | 2014-01-13 10:50:51 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2014-01-13 10:50:51 +0000 |
commit | 41bfe8dde13b629a13e95e3b5f31ba1efca993ac (patch) | |
tree | 990256f3b3f48af40186071435c66a36f96e5062 /clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | |
parent | 7fdd4857f7367c1e17ace045c195f2c85e2186ba (diff) | |
download | bcm5719-llvm-41bfe8dde13b629a13e95e3b5f31ba1efca993ac.tar.gz bcm5719-llvm-41bfe8dde13b629a13e95e3b5f31ba1efca993ac.zip |
Add the check name to the clang-tidy diagnostic output.
Summary:
Pass check names all the way from ClangTidyModule through
ClangTidyCheck and ClangTidyContext to ClangTidyError, and output it in
handleErrors. This allows to find mis-behaving check and disable it easily.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2534
llvm-svn: 199094
Diffstat (limited to 'clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp index bf1e3e38a3a..8b25d0292e0 100644 --- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp @@ -35,7 +35,7 @@ void ExplicitConstructorCheck::check(const MatchFinder::MatchResult &Result) { if (!Ctor->isExplicit() && !Ctor->isImplicit() && Ctor->getNumParams() >= 1 && Ctor->getMinRequiredArguments() <= 1) { SourceLocation Loc = Ctor->getLocation(); - Context->Diag(Loc, "Single-argument constructors must be explicit") + diag(Loc, "Single-argument constructors must be explicit") << FixItHint::CreateInsertion(Loc, "explicit "); } } |