[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 10 12:56:17 PST 2023


schenker wrote:

> I'm not sure now if this wont cause too much false-positives, after all this is why CheckFunctionCalls option were added. Sometimes object can have 2 same operators, one const and one not, in such case depend on "this" type, non-const could be used, this would be false-positive.

You are right, I misunderstood `CheckFunctionCalls` and it's trickier than I thought. Anyways, I think it would make sense to treat method calls and method operator calls the same way.

I will rething my imlementation, thanks for reviewing!



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


More information about the cfe-commits mailing list