Commit 385f83c
[clang] Fix assertion failure with explicit(bool) in pre-C++11 modes (#152985)
Allow CCEKind::ExplicitBool in BuildConvertedConstantExpression for
pre-C++11 contexts, similar to the existing TempArgStrict exception.
This enables explicit(bool) to work as a C++20 extension in earlier
language modes without triggering assertion failures.
Fixes #152729
---------
Co-authored-by: Jongmyeong Choi <[email protected]>1 parent 6b20b16 commit 385f83c
File tree
3 files changed
+19
-1
lines changed- clang
- docs
- lib/Sema
- test/Parser
3 files changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6275 | 6275 | | |
6276 | 6276 | | |
6277 | 6277 | | |
6278 | | - | |
| 6278 | + | |
| 6279 | + | |
| 6280 | + | |
6279 | 6281 | | |
6280 | 6282 | | |
6281 | 6283 | | |
| |||
| 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 | + | |
0 commit comments