@@ -99,7 +99,8 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
9999
100100 auto LoopExpr =
101101 [](const ast_matchers::internal::Matcher<Stmt> &InnerMatcher) {
102- return stmt (anyOf (forStmt (InnerMatcher), whileStmt (InnerMatcher), doStmt (InnerMatcher)));
102+ return stmt (anyOf (forStmt (InnerMatcher), whileStmt (InnerMatcher),
103+ doStmt (InnerMatcher)));
103104 };
104105
105106 const auto IntegerExpr = ignoringParenImpCasts (integerLiteral ());
@@ -140,10 +141,11 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder *Finder) {
140141 }
141142
142143 if (WarnOnSizeOfInLoopTermination) {
143- Finder->addMatcher (
144- LoopExpr (hasDescendant (
145- binaryOperator (allOf (has (SizeOfExpr.bind (" sizeof-expr" )), isComparisonOperator ()))
146- )).bind (" loop-expr" ), this );
144+ Finder->addMatcher (LoopExpr (hasDescendant (binaryOperator (
145+ allOf (has (SizeOfExpr.bind (" sizeof-expr" )),
146+ isComparisonOperator ()))))
147+ .bind (" loop-expr" ),
148+ this );
147149 }
148150
149151 // Detect sizeof(kPtr) where kPtr is 'const char* kPtr = "abc"';
@@ -373,7 +375,7 @@ void SizeofExpressionCheck::check(const MatchFinder::MatchResult &Result) {
373375 auto *SizeofArgTy = Result.Nodes .getNodeAs <Type>(" sizeof-arg-type" );
374376 if (const auto member = dyn_cast<MemberPointerType>(SizeofArgTy))
375377 SizeofArgTy = member->getPointeeType ().getTypePtr ();
376-
378+
377379 auto Loc = Result.Nodes .getNodeAs <Expr>(" sizeof-expr" );
378380
379381 if (const auto type = dyn_cast<ArrayType>(SizeofArgTy)) {
0 commit comments