Commit 9ea2a10
committed
Don't allow __VA_OPT__ to be detected by #ifdef.
More study has discovered this to not actually be useful: because
current C++20 implementations reject `#ifdef __VA_OPT__`, this can't
really be used as a feature-test mechanism. And it's not too hard to
detect __VA_OPT__ without this, for example:
#define THIRD_ARG(a, b, c, ...) c
#define HAS_VA_OPT(...) THIRD_ARG(__VA_OPT__(,), 1, 0, )
#if HAS_VA_OPT(?)
Partially reverts 0436ec2.
(cherry picked from commit 5dfa37a)1 parent ea99c88 commit 9ea2a10
File tree
6 files changed
+11
-64
lines changed- clang
- include/clang/Lex
- lib/Lex
- test/Preprocessor
6 files changed
+11
-64
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | 450 | | |
470 | 451 | | |
471 | 452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2928 | 2928 | | |
2929 | 2929 | | |
2930 | 2930 | | |
2931 | | - | |
2932 | | - | |
2933 | | - | |
2934 | 2931 | | |
2935 | 2932 | | |
2936 | 2933 | | |
2937 | | - | |
2938 | | - | |
2939 | 2934 | | |
2940 | 2935 | | |
2941 | 2936 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | 107 | | |
111 | 108 | | |
112 | 109 | | |
| |||
125 | 122 | | |
126 | 123 | | |
127 | 124 | | |
128 | | - | |
129 | | - | |
130 | 125 | | |
131 | 126 | | |
132 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
327 | | - | |
| 326 | + | |
328 | 327 | | |
329 | 328 | | |
330 | 329 | | |
331 | 330 | | |
332 | 331 | | |
333 | 332 | | |
334 | | - | |
335 | | - | |
336 | 333 | | |
337 | 334 | | |
338 | 335 | | |
| |||
346 | 343 | | |
347 | 344 | | |
348 | 345 | | |
349 | | - | |
350 | 346 | | |
351 | 347 | | |
352 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
123 | 130 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 5 | | |
20 | 6 | | |
21 | 7 | | |
| |||
82 | 68 | | |
83 | 69 | | |
84 | 70 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 71 | + | |
93 | 72 | | |
| 73 | + | |
| 74 | + | |
0 commit comments