Commit 82e48a5
Disable use of _ExtInt with '__atomic' builtins
We're (temporarily) disabling ExtInt for the '__atomic' builtins so we can better design their behavior later. The idea is until we do an audit/design for the way atomic builtins are supposed to work with _ExtInt, we should leave them restricted so they don't limit our future options, such as by binding us to a sub-optimal implementation via ABI.
Example after this change:
$ cat test.c
void f(_ExtInt(64) *ptr) {
__atomic_fetch_add(ptr, 1, 0);
}
$ clang -c test.c
test.c:2:22: error: argument to atomic builtin of type '_ExtInt' is not supported
__atomic_fetch_add(ptr, 1, 0);
^
1 error generated.
Differential Revision: https://reviews.llvm.org/D84049
(cherry picked from commit ca77ab4)1 parent 0c37a91 commit 82e48a5
File tree
6 files changed
+28
-9
lines changed- clang
- include/clang/Basic
- lib/Sema
- test
- SemaCXX
- Sema
- libcxx/test/libcxx/atomics
6 files changed
+28
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6021 | 6021 | | |
6022 | 6022 | | |
6023 | 6023 | | |
6024 | | - | |
6025 | | - | |
6026 | | - | |
| 6024 | + | |
| 6025 | + | |
6027 | 6026 | | |
6028 | 6027 | | |
6029 | 6028 | | |
| |||
7941 | 7940 | | |
7942 | 7941 | | |
7943 | 7942 | | |
| 7943 | + | |
| 7944 | + | |
7944 | 7945 | | |
7945 | 7946 | | |
7946 | 7947 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4956 | 4956 | | |
4957 | 4957 | | |
4958 | 4958 | | |
| 4959 | + | |
| 4960 | + | |
| 4961 | + | |
| 4962 | + | |
| 4963 | + | |
4959 | 4964 | | |
4960 | 4965 | | |
4961 | 4966 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8880 | 8880 | | |
8881 | 8881 | | |
8882 | 8882 | | |
8883 | | - | |
8884 | | - | |
| 8883 | + | |
8885 | 8884 | | |
8886 | | - | |
8887 | | - | |
8888 | 8885 | | |
8889 | 8886 | | |
8890 | 8887 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
288 | 290 | | |
289 | 291 | | |
290 | 292 | | |
291 | 293 | | |
292 | 294 | | |
293 | 295 | | |
| 296 | + | |
| 297 | + | |
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments