[clang] [clang][analyzer]Add C++ polymorphic ptr arithmetic checker (PR #82977)

via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 29 06:10:23 PST 2024


Discookie wrote:

That's a great heuristic! I wonder if there are false positives for this in the wild, will need to test on some projects.

I don't know about implementing it as a Clang warning - it probably wouldn't cause much of a performance penalty, but I'm not sure about the other requirements for such a warning. Would you recommend to implement the heuristic as a Tidy checker first, or go implement it as a warning directly? I think the required type info is also visible to Tidy.

I guess if I'm also going through with the heuristic, then I can mark this patch as abandoned.

https://github.com/llvm/llvm-project/pull/82977


More information about the cfe-commits mailing list