Commit d2f9d80
authored
[SPIRV] Add diagnostic for boolean bitfields (#7822)
Adds a diagnostic to flag the use of boolean bitfields in structs when
targeting SPIR-V. This is not supported for variables that are not
externally visible.
This change introduces a new error message in SemaHLSL to detect and
report this unsupported usage for:
- Local variables
- Function parameters
- Static global variables
A new test file is added to verify the diagnostic is triggered in these
cases and not for externally visible global variables.
Avoid the segfault reported in
#7790.1 parent 3056ae2 commit d2f9d80
File tree
3 files changed
+60
-0
lines changed- tools/clang
- include/clang/Basic
- lib/Sema
- test/SemaHLSL
3 files changed
+60
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1303 | 1303 | | |
1304 | 1304 | | |
1305 | 1305 | | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
1306 | 1310 | | |
1307 | 1311 | | |
1308 | 1312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16072 | 16072 | | |
16073 | 16073 | | |
16074 | 16074 | | |
| 16075 | + | |
| 16076 | + | |
| 16077 | + | |
| 16078 | + | |
| 16079 | + | |
| 16080 | + | |
| 16081 | + | |
| 16082 | + | |
| 16083 | + | |
| 16084 | + | |
| 16085 | + | |
| 16086 | + | |
| 16087 | + | |
| 16088 | + | |
| 16089 | + | |
| 16090 | + | |
| 16091 | + | |
| 16092 | + | |
| 16093 | + | |
| 16094 | + | |
| 16095 | + | |
| 16096 | + | |
| 16097 | + | |
| 16098 | + | |
| 16099 | + | |
| 16100 | + | |
| 16101 | + | |
16075 | 16102 | | |
16076 | 16103 | | |
16077 | 16104 | | |
| |||
| 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 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments