ziqingluo-90 wrote:

@NagyDonat I see.  I misunderstood two parts in a similar way:
- `setDeclWithIssue` sets the **enclosing** Decl instead of the Decl being 
reported.
- `GetEnclosingDeclContextSignature` returns the signature of the argument, 
which is the enclosing Decl itself, instead of the enclosing Decl of the 
argument.

To be fair to AI,  I read the doc and function names myself and that's how I 
understood them.   AI probably can figure out their "real" meanings by looking 
at how they are used elsewhere.   I think the doc of `setDeclWithIssue` can be 
clearer if it explicitly states that the argument is the enclosing context of 
the issue.  A better option is to rename `setDeclWithIssue` to something like 
`setContextDeclWithIssue`.  Similar for `GetEnclosingDeclContextSignature`.



https://github.com/llvm/llvm-project/pull/214102
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to