================
@@ -63,23 +80,27 @@ void setBitsAccordingToFunctionAttributes(const CallType
&Call,
// 'nonnull' attribute's parameters are 1-based and should be adjusted to
// match actual AST parameter/argument indices.
unsigned IdxAST = Idx.getASTIndex();
- if (IdxAST >= AttrNonNull.size())
+ if (IdxAST < Offset)
+ continue;
+ const unsigned IdxArg = IdxAST - Offset;
----------------
NagyDonat wrote:
I see.
Then what would you think about _introducing_ a conversion method
`adjustASTArgIdxToNativeIdx` within `class CallEvent`? Perhaps it's an
overkill, but perhaps other checkers may also need this logic – and the logic
itself may also change if the next versions of C++ introduce yet another
exceptional parameter kind.
https://github.com/llvm/llvm-project/pull/221977
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits