[clang] [analyzer][NFC] Document and centralize the CallEvent argument/parameter index mapping (PR #221252)

Benedek Kaibas via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 03:41:09 PDT 2026


================
@@ -1073,6 +1073,10 @@ class ParamVarRegion : public VarRegion {
   friend class MemRegionManager;
 
   const Expr *OriginExpr;
+
+  /// Index of the declared parameter of the callee that this region stands
+  /// for. This is not necessarily the index of the corresponding argument
+  /// in `OriginExpr`. See `CallEvent::getDeclaredParameterIndex()`.
   unsigned Index;
----------------
benedekaibas wrote:

https://github.com/llvm/llvm-project/pull/221252#issuecomment-5625953046 test failure was related to my changes in [99e628b](https://github.com/llvm/llvm-project/pull/221252/commits/99e628b05e75f815ac34820eccc384c6ecb6db17) and the fact that I did not apply the changes in `MemRegion.cpp` as well. I have done the changes in [aa0b824](https://github.com/llvm/llvm-project/pull/221252/commits/aa0b824ae588f238412871c1bc5a45e9d8784cb0), so now it builds and passes all the tests correctly.

@NagyDonat 

https://github.com/llvm/llvm-project/pull/221252


More information about the cfe-commits mailing list