[clang] [webkit.NoUncountedMemberChecker] Warn a raw pointer member in a template instantiation (PR #240100)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 8 04:12:53 PST 2026


https://github.com/steakhal requested changes to this pull request.

I'm going to be honest and this looks super over complicated.
At first glance, I think you should have a look at [getPointOfInstantiation](https://clang.llvm.org/doxygen/classclang_1_1FunctionTemplateSpecializationInfo.html#a8455a2551d86b9bbdeb904858dcb458d) or some similar SourceLocation function.

If that doesn't work, you can always get to the partial specialization or primary template declaration from a specialization - it's not super easy but my approach in this space generally to dump the AST with decl pointers! and then print debug my way and confirming each step that the decl I'm traversing to has the pointer that I want. Do all this while also carefully reading the member functions you use and the alternatives because there are like 5 different ways to get to from a specialization decl to reach some other specialization decl.

Either way, I'm 99% sure we don't need the extra DenseMap.

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


More information about the cfe-commits mailing list