Commit 8d70f4b
committed
[Clang] Warning as error for fold expressions over comparison operators
We made chained comparisons an error.
Fold exprerssions over a comparison operators produce chained
comparison, so we should be consistent there too.
We only emit the warning when instantiating the fold expression
as to not warn on types with user-defined comparisons.
Partially addresses #1295701 parent 4cb9a37 commit 8d70f4b
File tree
5 files changed
+40
-1
lines changed- clang
- docs
- include/clang/Basic
- lib/Sema
- test
- Parser
- SemaTemplate
5 files changed
+40
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7138 | 7138 | | |
7139 | 7139 | | |
7140 | 7140 | | |
| 7141 | + | |
| 7142 | + | |
| 7143 | + | |
| 7144 | + | |
| 7145 | + | |
7141 | 7146 | | |
7142 | 7147 | | |
7143 | 7148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16411 | 16411 | | |
16412 | 16412 | | |
16413 | 16413 | | |
| 16414 | + | |
16414 | 16415 | | |
16415 | 16416 | | |
16416 | 16417 | | |
| |||
16439 | 16440 | | |
16440 | 16441 | | |
16441 | 16442 | | |
| 16443 | + | |
| 16444 | + | |
| 16445 | + | |
| 16446 | + | |
| 16447 | + | |
| 16448 | + | |
| 16449 | + | |
16442 | 16450 | | |
16443 | 16451 | | |
16444 | 16452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | | - | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
0 commit comments