haoNoQ wrote:

Hmm it doesn't look like we actually have that other suppression. It looks like 
the checker simply never warned in the standard library because there aren't 
WebKit classes in the standard library. But it looks like you've found a few 
cases where it actually happens? How does this happen? Is this because 
templates get instantiated with WTF classes as type arguments? Maybe a 
something completely different solution should be considered?

If we think it's actually a good idea to suppress warnings about standard 
functions, typically these suppressions are implemented with 
`getSourceManager().isInSystemHeader(SLoc)` checks, such as [the one we 
actually 
have](https://github.com/llvm/llvm-project/blob/llvmorg-19-init/clang/lib/StaticAnalyzer/Checkers/WebKit/NoUncountedMembersChecker.cpp#L110).
 This covers not only the standard library, but also other code outside of your 
project (basically everything that goes with `-isystem` as opposed to `-I`). 
Which may or may not be what we want.

I think it's likely that your solution is optimal but I still want to see some 
examples to understand what exactly we're dealing with.

https://github.com/llvm/llvm-project/pull/90552
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to