We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb4ae35 commit 9b060d1Copy full SHA for 9b060d1
clang/lib/AST/ByteCode/Compiler.cpp
@@ -4033,6 +4033,9 @@ template <class Emitter> bool Compiler<Emitter>::visitBool(const Expr *E) {
4033
template <class Emitter>
4034
bool Compiler<Emitter>::visitZeroInitializer(PrimType T, QualType QT,
4035
const Expr *E) {
4036
+ if (const auto *AT = QT->getAs<AtomicType>())
4037
+ QT = AT->getValueType();
4038
+
4039
switch (T) {
4040
case PT_Bool:
4041
return this->emitZeroBool(E);
clang/test/AST/ByteCode/floats.cpp
@@ -175,7 +175,10 @@ namespace ZeroInit {
175
static_assert(a.f == 0.0f, "");
176
177
constexpr A<double> b{12};
178
- static_assert(a.f == 0.0, "");
+ static_assert(b.f == 0.0, "");
179
180
+ constexpr A<_Atomic(float)> c{12};
181
+ static_assert(c.f == 0.0, "");
182
};
183
184
namespace LongDouble {
0 commit comments