[clang-tidy] Fix minor style issues. NFC
llvm-svn: 259198
This commit is contained in:
parent
8ac20a8439
commit
bfee5f7352
|
|
@ -168,9 +168,8 @@ static bool checkOverrideByDerivedMethod(const CXXMethodDecl *BaseMD,
|
|||
E = DerivedMD->end_overridden_methods();
|
||||
I != E; ++I) {
|
||||
const CXXMethodDecl *OverriddenMD = *I;
|
||||
if (BaseMD->getCanonicalDecl() == OverriddenMD->getCanonicalDecl()) {
|
||||
if (BaseMD->getCanonicalDecl() == OverriddenMD->getCanonicalDecl())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ namespace {
|
|||
// The subtelty is that in some cases (user defined conversions), we can
|
||||
// get to ImplicitCastExpr inside each other, with the outer one a NoOp. In this
|
||||
// case we skip the first cast expr.
|
||||
bool IsNonTrivialImplicitCast(const Stmt* ST) {
|
||||
if (const auto* ICE = dyn_cast<ImplicitCastExpr>(ST)) {
|
||||
bool IsNonTrivialImplicitCast(const Stmt *ST) {
|
||||
if (const auto *ICE = dyn_cast<ImplicitCastExpr>(ST)) {
|
||||
return (ICE->getCastKind() != CK_NoOp) ||
|
||||
IsNonTrivialImplicitCast(ICE->getSubExpr());
|
||||
}
|
||||
|
|
@ -57,15 +57,15 @@ void ImplicitCastInLoopCheck::registerMatchers(MatchFinder *Finder) {
|
|||
}
|
||||
|
||||
void ImplicitCastInLoopCheck::check(const MatchFinder::MatchResult &Result) {
|
||||
const auto* VD = Result.Nodes.getNodeAs<VarDecl>("faulty-var");
|
||||
const auto* Init = Result.Nodes.getNodeAs<Expr>("init");
|
||||
const auto* OperatorCall =
|
||||
const auto *VD = Result.Nodes.getNodeAs<VarDecl>("faulty-var");
|
||||
const auto *Init = Result.Nodes.getNodeAs<Expr>("init");
|
||||
const auto *OperatorCall =
|
||||
Result.Nodes.getNodeAs<CXXOperatorCallExpr>("operator-call");
|
||||
|
||||
if (const auto* Cleanup = dyn_cast<ExprWithCleanups>(Init))
|
||||
if (const auto *Cleanup = dyn_cast<ExprWithCleanups>(Init))
|
||||
Init = Cleanup->getSubExpr();
|
||||
|
||||
const auto* Materialized = dyn_cast<MaterializeTemporaryExpr>(Init);
|
||||
const auto *Materialized = dyn_cast<MaterializeTemporaryExpr>(Init);
|
||||
if (!Materialized)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue