[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-initialization: Consider static functions (PR #119974)

Julian Schmidt via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 15 16:33:13 PST 2024


https://github.com/5chmidti commented:

> Not sure how many more tests I should add, since this uses the same code paths as free functions.

I think the amount of tests you've added are enough

> This is the 5th instance of the `isStatic` matcher in clang-tidy.

Good point, thanks. I've checked to see if they could be replaced with `isStaticStorageClass`, but that won't work due to #120027, and the matcher has to be modified further by (IMO) overloading on `CXXMethodDecl` to use `isStatic` like these matchers, instead of the storage class alone. You can just keep it as-is.

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


More information about the cfe-commits mailing list