[clang] [clang][Interp] Handle CXXScalarValueInitExprs (PR #67147)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 22 07:57:41 PDT 2023
================
@@ -31,6 +31,13 @@ static_assert(b, "");
constexpr int one = true;
static_assert(one == 1, "");
+constexpr bool b2 = bool();
+static_assert(!b2, "");
+constexpr int ScalarInitInt = int();
+static_assert(ScalarInitInt == 0, "");
+constexpr float ScalarInitFloat = float();
+static_assert(ScalarInitInt == 0.0f, "");
----------------
tbaederr wrote:
```suggestion
static_assert(ScalarInitFloat == 0.0f, "");
```
https://github.com/llvm/llvm-project/pull/67147
More information about the cfe-commits
mailing list