[llvm-branch-commits] [clang] [analyzer] Replace getAdjustedParameterIndex with getDeclaredParameterIndex in CallEvent.cpp (PR #221727)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Sep 7 06:24:45 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-static-analyzer-1
Author: Benedek Kaibas (benedekaibas)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/221727.diff
1 Files Affected:
- (modified) clang/lib/StaticAnalyzer/Core/CallEvent.cpp (+3-3)
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Core/CallEvent.cpp b/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
index 8eab3f19dc0a8..cbcc0c7d3b717 100644
--- a/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
+++ b/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
@@ -285,10 +285,10 @@ ProgramStateRef CallEvent::invalidateRegions(unsigned BlockCount,
// TODO: This is unnecessary when there's no destructor, but that's
// currently hard to figure out.
if (getKind() != CE_CXXAllocator)
- if (isArgumentConstructedDirectly(Idx))
- if (auto AdjIdx = getAdjustedParameterIndex(Idx))
+ if (isArgumentConstructedDirectly(getASTArgumentIndex(Idx)))
+ if (std::optional<unsigned> DeclParamIdx = getDeclaredParameterIndex(Idx))
if (const TypedValueRegion *TVR =
- getParameterLocation(*AdjIdx, BlockCount))
+ getParameterLocation(*DeclParamIdx, BlockCount))
ValuesToInvalidate.push_back(loc::MemRegionVal(TVR));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/221727
More information about the llvm-branch-commits
mailing list