[clang-tools-extra] r259198 - [clang-tidy] Fix minor style issues. NFC
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 29 07:22:22 PST 2016
Author: alexfh
Date: Fri Jan 29 09:22:20 2016
New Revision: 259198
URL: http://llvm.org/viewvc/llvm-project?rev=259198&view=rev
Log:
[clang-tidy] Fix minor style issues. NFC
Modified:
clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp
clang-tools-extra/trunk/clang-tidy/performance/ImplicitCastInLoopCheck.cpp
Modified: clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp?rev=259198&r1=259197&r2=259198&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp Fri Jan 29 09:22:20 2016
@@ -168,9 +168,8 @@ static bool checkOverrideByDerivedMethod
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;
Modified: clang-tools-extra/trunk/clang-tidy/performance/ImplicitCastInLoopCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/performance/ImplicitCastInLoopCheck.cpp?rev=259198&r1=259197&r2=259198&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/performance/ImplicitCastInLoopCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/performance/ImplicitCastInLoopCheck.cpp Fri Jan 29 09:22:20 2016
@@ -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::registerMa
}
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;
More information about the cfe-commits
mailing list