Bug 1410472 - clang-plugin follows the LLVM coding style for real r=mystor

MozReview-Commit-ID: AXrQEjWzxvg
This commit is contained in:
Sylvestre Ledru
2017-10-20 19:11:50 +02:00
parent 480c1a8de7
commit 173e982fb0
67 changed files with 601 additions and 667 deletions

View File

@@ -5,7 +5,7 @@
#include "ExplicitOperatorBoolChecker.h"
#include "CustomMatchers.h"
void ExplicitOperatorBoolChecker::registerMatchers(MatchFinder* AstMatcher) {
void ExplicitOperatorBoolChecker::registerMatchers(MatchFinder *AstMatcher) {
// Older clang versions such as the ones used on the infra recognize these
// conversions as 'operator _Bool', but newer clang versions recognize these
// as 'operator bool'.
@@ -26,8 +26,10 @@ void ExplicitOperatorBoolChecker::check(
!ASTIsInSystemHeader(Method->getASTContext(), *Method) &&
isInterestingDeclForImplicitConversion(Method)) {
diag(Method->getLocStart(), "bad implicit conversion operator for %0",
DiagnosticIDs::Error) << Clazz;
DiagnosticIDs::Error)
<< Clazz;
diag(Method->getLocStart(), "consider adding the explicit keyword to %0",
DiagnosticIDs::Note) << "'operator bool'";
DiagnosticIDs::Note)
<< "'operator bool'";
}
}