Bug 1410472 - clang-plugin follows the LLVM coding style for real r=mystor
MozReview-Commit-ID: AXrQEjWzxvg
This commit is contained in:
@@ -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'";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user