Commit f3cd6b7
[HLSL] Convert vectors to bool for unary ! (#163857)
HLSL extends C++'s requirement that unary `!` apply to boolean arguments
and produces boolean results to apply to vectors. This change implements
implicit conversion for non-boolean vector operands to boolean vectors.
I've noted this behavior in the issue tracking writing the HLSL
specification section on unary operators
(microsoft/hlsl-specs#686).
Fixes #162913
---------
Co-authored-by: Farzon Lotfi <[email protected]>
Co-authored-by: Erich Keane <[email protected]>1 parent f404517 commit f3cd6b7
File tree
3 files changed
+100
-0
lines changed- clang
- lib/Sema
- test
- CodeGenHLSL/Operators
- SemaHLSL/Operators
3 files changed
+100
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15944 | 15944 | | |
15945 | 15945 | | |
15946 | 15946 | | |
| 15947 | + | |
| 15948 | + | |
| 15949 | + | |
| 15950 | + | |
| 15951 | + | |
| 15952 | + | |
| 15953 | + | |
| 15954 | + | |
| 15955 | + | |
| 15956 | + | |
| 15957 | + | |
| 15958 | + | |
| 15959 | + | |
| 15960 | + | |
15947 | 15961 | | |
15948 | 15962 | | |
15949 | 15963 | | |
| |||
| 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 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 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 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments