[clang] f8dd127 - [clang][analyzer] Remove a copy in a loop in VAListChecker (#162620)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 9 04:46:03 PDT 2025


Author: Gábor Horváth
Date: 2025-10-09T12:46:00+01:00
New Revision: f8dd127842419d85c41674699fcd8d3e6db622a7

URL: https://github.com/llvm/llvm-project/commit/f8dd127842419d85c41674699fcd8d3e6db622a7
DIFF: https://github.com/llvm/llvm-project/commit/f8dd127842419d85c41674699fcd8d3e6db622a7.diff

LOG: [clang][analyzer] Remove a copy in a loop in VAListChecker (#162620)

Co-authored-by: Gabor Horvath <gaborh at apple.com>

Added: 
    

Modified: 
    clang/lib/StaticAnalyzer/Checkers/VAListChecker.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/StaticAnalyzer/Checkers/VAListChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/VAListChecker.cpp
index 79fd0bd4c9dd9..503fa5de868f2 100644
--- a/clang/lib/StaticAnalyzer/Checkers/VAListChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/VAListChecker.cpp
@@ -149,7 +149,7 @@ void VAListChecker::checkPreCall(const CallEvent &Call,
   else if (VaEnd.matches(Call))
     checkVAListEndCall(Call, C);
   else {
-    for (auto FuncInfo : VAListAccepters) {
+    for (const auto &FuncInfo : VAListAccepters) {
       if (!FuncInfo.Func.matches(Call))
         continue;
       const MemRegion *VAList =


        


More information about the cfe-commits mailing list