Commit 721393e
committed
[clang-tidy]improve performance-unnecessary-value-param performance
Tolerate fix-it breaking compilation when functions is used as pointers.
`isReferencedOutsideOfCallExpr` will visit the whole translate unit for each matched function decls. It will waste lots of cpu time in some big cpp files.
But the benefits of this validation are limited. Lots of function usage are out of current translation unit.
After removing this validation step, the check profiling changes from 5.7 to 1.1 in SemaExprCXX.cpp, which is similar to version 18.1 parent ed48398 commit 721393e
File tree
3 files changed
+7
-18
lines changed- clang-tools-extra
- clang-tidy/performance
- docs
- test/clang-tidy/checkers/performance
3 files changed
+7
-18
lines changedLines changed: 1 addition & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 32 | | |
42 | 33 | | |
43 | 34 | | |
| |||
155 | 146 | | |
156 | 147 | | |
157 | 148 | | |
158 | | - | |
159 | | - | |
160 | | - | |
| 149 | + | |
161 | 150 | | |
162 | 151 | | |
163 | | - | |
164 | 152 | | |
165 | 153 | | |
166 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
| 335 | + | |
340 | 336 | | |
341 | 337 | | |
342 | 338 | | |
| |||
0 commit comments