[clang] [clang][analyzer] Remove a copy in a loop in VAListChecker (PR #162620)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 9 02:48:41 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-static-analyzer-1
Author: Gábor Horváth (Xazax-hun)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/162620.diff
1 Files Affected:
- (modified) clang/lib/StaticAnalyzer/Checkers/VAListChecker.cpp (+1-1)
``````````diff
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 =
``````````
</details>
https://github.com/llvm/llvm-project/pull/162620
More information about the cfe-commits
mailing list