[clang] [analyzer][NFC] Document and centralize the CallEvent argument/parameter index mapping (PR #221252)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 8 09:52:06 PDT 2026
================
@@ -420,6 +420,9 @@ class CallEvent {
/// Returns memory location for a parameter variable within the callee stack
/// frame. The behavior is undefined if the block count is different from the
/// one that is there when call happens. May fail; returns null on failure.
+ ///
+ /// \param Index refers to the index of the declared parameter of the callee.
+ /// See getDeclaredParameterIndex().
const ParamVarRegion *getParameterLocation(unsigned Index,
----------------
NagyDonat wrote:
Consider renaming the parameter `Index` to `DeclParamIdx` (as you do in some other locations). The parameter name is e.g. displayed by some IDEs, so it is helpful to also encode this information in it.
https://github.com/llvm/llvm-project/pull/221252
More information about the cfe-commits
mailing list