Commit 5a20b72
authored
[ADT] Simplify ResolveUnderlyingType (NFC) (llvm#164114)
We have three implementations of ResolveUnderlyingType:
- enum
- bool
- neither
This patch combines the latter two with std::conditional_t.
Without this patch, we use "void" to trigger a compilation failure
downstream when sizeof(bool) != 1, which is not very friendly. This
patch instead uses static_assert to catch the case where the user
chooses to use bool but sizeof(bool) != 1.1 parent 9351ad6 commit 5a20b72
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
163 | 160 | | |
164 | 161 | | |
165 | 162 | | |
| |||
0 commit comments