[PATCH] D103087: [clang-tidy] performances-unnecessary-* checks: Extend isOnlyUsedAsConst to expressions and catch const methods returning non-const references/pointers.

2021-06-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D103087#2813901 , @flx wrote: > In D103087#2793673 , @ymandel wrote: > >> I have some concerns about the cost of this checks as it used matching over >> entire contexts quite

[PATCH] D103087: [clang-tidy] performances-unnecessary-* checks: Extend isOnlyUsedAsConst to expressions and catch const methods returning non-const references/pointers.

2021-06-11 Thread Felix Berger via Phabricator via cfe-commits
flx added a comment. In D103087#2793673 , @ymandel wrote: > I have some concerns about the cost of this checks as it used matching over > entire contexts quite extensively. At this point, the facilities involved > seem quite close to doing dataflow

[PATCH] D103087: [clang-tidy] performances-unnecessary-* checks: Extend isOnlyUsedAsConst to expressions and catch const methods returning non-const references/pointers.

2021-06-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. I have some concerns about the cost of this checks as it used matching over entire contexts quite extensively. At this point, the facilities involved seem quite close to doing dataflow analysis and I wonder if you might be better off with a very different

[PATCH] D103087: [clang-tidy] performances-unnecessary-* checks: Extend isOnlyUsedAsConst to expressions and catch const methods returning non-const references/pointers.

2021-05-25 Thread Felix Berger via Phabricator via cfe-commits
flx created this revision. flx added reviewers: aaron.ballman, hokein, ymandel. Herald added a subscriber: xazax.hun. flx requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. This change extends isOnlyUsedAsConst() to avoid false