JonasToth added inline comments.
================ Comment at: clang-tidy/bugprone/MisplacedOperatorInStrlenInAllocCheck.cpp:62 + const Expr *Alloc = Result.Nodes.getNodeAs<CallExpr>("Alloc"); + if (!Alloc) Alloc = Result.Nodes.getNodeAs<CXXNewExpr>("Alloc"); const auto *StrLen = Result.Nodes.getNodeAs<CallExpr>("StrLen"); ---------------- Break after if condition. You could use the ternary operator, too. Maybe a safeguard assertion if `Alloc` is nullptr after the second assignemt. This would uncover a potential bug. Repository: rL LLVM https://reviews.llvm.org/D39367 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits