Commit f459a97
committed
[C2y] Allow static local variables in inline functions with external linkage (N3622)
This allows static local variables to be declared in inline functions with external linkage, a constraint that was removed in WG14 N3622. Such declarations are now allowed in C2y mode, and accepted as an extension in earlier language models. The code changes carried out were heavily inspired by commit 8e60adc, which implemented making use of static variables or functions within extern inline functions as part of the same paper.1 parent 4ecb3c7 commit f459a97
File tree
5 files changed
+54
-8
lines changed- clang
- include/clang/Basic
- lib/Sema
- test
- C/C2y
- Sema
5 files changed
+54
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1401 | 1401 | | |
1402 | 1402 | | |
1403 | 1403 | | |
1404 | | - | |
| 1404 | + | |
1405 | 1405 | | |
1406 | 1406 | | |
1407 | 1407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6339 | 6339 | | |
6340 | 6340 | | |
6341 | 6341 | | |
6342 | | - | |
6343 | | - | |
6344 | | - | |
| 6342 | + | |
| 6343 | + | |
| 6344 | + | |
| 6345 | + | |
| 6346 | + | |
| 6347 | + | |
| 6348 | + | |
| 6349 | + | |
| 6350 | + | |
| 6351 | + | |
| 6352 | + | |
| 6353 | + | |
6345 | 6354 | | |
6346 | 6355 | | |
6347 | 6356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8111 | 8111 | | |
8112 | 8112 | | |
8113 | 8113 | | |
| 8114 | + | |
| 8115 | + | |
| 8116 | + | |
| 8117 | + | |
| 8118 | + | |
8114 | 8119 | | |
8115 | 8120 | | |
8116 | 8121 | | |
| |||
8120 | 8125 | | |
8121 | 8126 | | |
8122 | 8127 | | |
8123 | | - | |
8124 | | - | |
| 8128 | + | |
| 8129 | + | |
| 8130 | + | |
| 8131 | + | |
| 8132 | + | |
| 8133 | + | |
| 8134 | + | |
| 8135 | + | |
| 8136 | + | |
8125 | 8137 | | |
8126 | 8138 | | |
8127 | 8139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
0 commit comments