Commit f9bd62f
authored
[clang-tidy] Improve
The previous code was pretty messy and treated value dependant
expressions which could not be evaluated the same as if they evaluted to
`false`. Which was obviously not correct.
We now check if we can evaluate the dependant expressions and if not we
truthfully return that we don't know if the function is declared as
`noexcept` or not.
This fixes #68101ExceptionSpecAnalyzers handling of conditional noexcept expressions (#68359)1 parent 1c3fdb3 commit f9bd62f
File tree
4 files changed
+60
-14
lines changed- clang-tools-extra
- clang-tidy/utils
- docs
- test/clang-tidy/checkers/performance
4 files changed
+60
-14
lines changedLines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
145 | 153 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
152 | 161 | | |
153 | 162 | | |
154 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
297 | 301 | | |
298 | 302 | | |
299 | | - | |
| 303 | + | |
| 304 | + | |
300 | 305 | | |
301 | 306 | | |
302 | 307 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
3 | 12 | | |
4 | 13 | | |
5 | 14 | | |
| |||
379 | 388 | | |
380 | 389 | | |
381 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
Lines changed: 21 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
3 | 12 | | |
4 | 13 | | |
5 | 14 | | |
| |||
54 | 63 | | |
55 | 64 | | |
56 | 65 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| |||
151 | 157 | | |
152 | 158 | | |
153 | 159 | | |
154 | | - | |
155 | | - | |
156 | | - | |
| 160 | + | |
| 161 | + | |
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
| |||
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
220 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
0 commit comments