Skip to content

Conversation

Xazax-hun
Copy link
Collaborator

No description provided.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:static analyzer labels Oct 9, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 9, 2025

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-static-analyzer-1

Author: Gábor Horváth (Xazax-hun)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/162620.diff

1 Files Affected:

  • (modified) clang/lib/StaticAnalyzer/Checkers/VAListChecker.cpp (+1-1)
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 =

Copy link
Contributor

@NagyDonat NagyDonat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@Xazax-hun Xazax-hun merged commit f8dd127 into llvm:main Oct 9, 2025
12 checks passed
Copy link
Collaborator

@shafik shafik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

svkeerthy pushed a commit that referenced this pull request Oct 9, 2025
clingfei pushed a commit to clingfei/llvm-project that referenced this pull request Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:static analyzer clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants