Commit b144258
authored
[Clang] Improve error recovery for invalid calls (llvm#136295)
It doesn't make sense that we only build a RecoveryExpr for expressions
with invalid trailing commas. This patch extends it so that we now
always build up a RecoveryExpr whenever the call contains anything
invalid. As a result, we can back out HasTrailingComma.
There is only one diagnostic change as to concepts, where a RecoveryExpr
than an ExprError is now used to model an invalid requires clause, for
which we suggest adding parentheses around it. (This looks like what GCC
diagnoses)1 parent 46e7347 commit b144258
File tree
6 files changed
+31
-29
lines changed- clang
- docs
- include/clang/Parse
- lib/Parse
- test
- AST
- Parser
6 files changed
+31
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
401 | 404 | | |
402 | 405 | | |
403 | 406 | | |
404 | 407 | | |
405 | 408 | | |
406 | 409 | | |
407 | 410 | | |
408 | | - | |
409 | 411 | | |
410 | 412 | | |
411 | 413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1942 | 1942 | | |
1943 | 1943 | | |
1944 | 1944 | | |
1945 | | - | |
1946 | | - | |
| 1945 | + | |
1947 | 1946 | | |
1948 | 1947 | | |
1949 | 1948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2218 | 2218 | | |
2219 | 2219 | | |
2220 | 2220 | | |
| 2221 | + | |
2221 | 2222 | | |
2222 | 2223 | | |
2223 | | - | |
2224 | | - | |
2225 | | - | |
2226 | | - | |
2227 | | - | |
2228 | | - | |
2229 | | - | |
2230 | | - | |
2231 | | - | |
2232 | | - | |
2233 | | - | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
2234 | 2228 | | |
2235 | 2229 | | |
2236 | 2230 | | |
2237 | 2231 | | |
2238 | 2232 | | |
2239 | 2233 | | |
2240 | 2234 | | |
2241 | | - | |
2242 | 2235 | | |
2243 | 2236 | | |
2244 | 2237 | | |
| |||
2249 | 2242 | | |
2250 | 2243 | | |
2251 | 2244 | | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
2252 | 2251 | | |
2253 | 2252 | | |
2254 | 2253 | | |
| |||
3700 | 3699 | | |
3701 | 3700 | | |
3702 | 3701 | | |
3703 | | - | |
3704 | | - | |
| 3702 | + | |
3705 | 3703 | | |
3706 | 3704 | | |
3707 | 3705 | | |
| |||
3744 | 3742 | | |
3745 | 3743 | | |
3746 | 3744 | | |
3747 | | - | |
3748 | | - | |
3749 | | - | |
3750 | | - | |
3751 | | - | |
3752 | 3745 | | |
3753 | 3746 | | |
3754 | 3747 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
24 | | - | |
| 30 | + | |
25 | 31 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
0 commit comments