================
@@ -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;
----------------
benedekaibas wrote:

> Also, now that I re-read this, please update `IdxAST` to `ASTArgIdx` (if I'm 
> right it is exactly that kind of index). It is close enough to _guess_ the 
> relationship but it would be better if the reader wouldn't need to guess.

I would actually name it DeclParamIdx. It is also what I have in CallEvent.h as 
a do comment and also getASTIndex is documented as "zero-origin not including 
any C++ implicit this parameter".

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

Reply via email to