njames93 added a comment. I have a feeling the default should be to only warm in loops otherwise this could get noisy. Though setting it as the default you'd likely want to change the name to something along the lines of WarmOutsideLoops.
================ Comment at: clang-tools-extra/clang-tidy/performance/ExpensiveFlatContainerOperationCheck.cpp:70 + const auto IsWithinLoop = cxxMemberCallExpr( + hasAncestor(stmt(anyOf(forStmt(), whileStmt(), doStmt())).bind("loop")), + // An easy false positive case: the variable is declared in the loop. ---------------- Rather than checking for an ancestor. Use the mapAnyOf matcher to check for a descendant in a loops body, this would remove the need for the false positive check below. Also you aren't checking a ranged for. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131939/new/ https://reviews.llvm.org/D131939 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits