alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land.
LG ================ Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:152 + + const Stmt * LoopStmt = nullptr; + if (ForLoop) ---------------- hokein wrote: > alexfh wrote: > > const Stmt *LoopStmt = ForLoop ? ForLoop : RangeLoop; > We can't do it because `ForLoop` and `RangeLoop` are different types. Yup, static_cast<Stmt*> would be more ugly. This could still be shortened a bit: const Stmt *LoopStmt = ForLoop; if (!LoopStmt) LoopStmt = RangeLoop; Not that it makes too much difference though. Up to you. ================ Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:153 + + const Stmt * LoopStmt = nullptr; + if (ForLoop) ---------------- nit: Please remove the extra space after the asterisk. https://reviews.llvm.org/D32436 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits