From 3b26849f38f807ef4bf94bb4ade3c58da1dfa48e Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Tue, 29 Apr 2014 15:50:14 +0000 Subject: Fix the message for "Move constructor declared explicit". Make the tests for removal of 'explicit' more diverse. llvm-svn: 207534 --- clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp') diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp index a150a8c43ec..a732242f778 100644 --- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp @@ -71,7 +71,8 @@ void ExplicitConstructorCheck::check(const MatchFinder::MatchResult &Result) { Ctor->getOuterLocStart(), Ctor->getLocEnd(), isKWExplicit); if (ExplicitTokenRange.isValid()) { DiagnosticBuilder Diag = diag(ExplicitTokenRange.getBegin(), - "Copy constructor declared explicit."); + "%0 constructor declared explicit.") + << (Ctor->isMoveConstructor() ? "Move" : "Copy"); Diag << FixItHint::CreateRemoval( CharSourceRange::getCharRange(ExplicitTokenRange)); } -- cgit v1.2.3