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

1. Wrong check name, maybe readability-unessesary-external-linkage or 
something, maybe it should even be an performance check [as there it will bring 
more benefits] (current check suggest more an "static methods").
2. Add support for unity builds (.cpp files included from single .cpp file = 
isInMainFile is not sufficient)
3. Diagnostic need to be more detailed
4. When I run into these issues, i got questions from developers why not use 
anonymous namespaces (maybe it could be configurable, or finall check restrict 
only to static [I prefer static])

Additionally when those issues were being fixed in project, there were lot of 
situations where there were forward declaration in header file, but developer 
forget to include header file in .cpp, this is why diagnostic need to be more 
detailed, so developer could find issue, instead of adding static.

In summary, my main concern is check name & diagnostic, current name is too 
generic

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

Reply via email to