detab source code (#20962)

This commit is contained in:
Walter Bright 2025-03-06 18:31:19 -08:00 committed by GitHub
parent 42619075eb
commit 4c4b9aef4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4890,7 +4890,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
{ {
return setError(); return setError();
} }
if (!exp.placement.type.isNaked()) if (!exp.placement.type.isNaked())
{ {
error(p.loc, "PlacementExpression `%s` of type `%s` be unshared and mutable", p.toChars(), toChars(p.type)); error(p.loc, "PlacementExpression `%s` of type `%s` be unshared and mutable", p.toChars(), toChars(p.type));
return setError(); return setError();
@ -5221,7 +5221,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
return; return;
} }
else if (sc.needsCodegen() && // interpreter doesn't need this lowered else if (sc.needsCodegen() && // interpreter doesn't need this lowered
!exp.placement && !exp.placement &&
!exp.onstack && !exp.type.isScopeClass()) // these won't use the GC !exp.onstack && !exp.type.isScopeClass()) // these won't use the GC
{ {
/* replace `new T(arguments)` with `core.lifetime._d_newclassT!T(arguments)` /* replace `new T(arguments)` with `core.lifetime._d_newclassT!T(arguments)`
@ -5327,8 +5327,8 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
} }
exp.type = exp.type.pointerTo(); exp.type = exp.type.pointerTo();
if (!exp.placement) if (!exp.placement)
tryLowerToNewItem(exp); tryLowerToNewItem(exp);
} }
else if (tb.ty == Tarray) else if (tb.ty == Tarray)
{ {
@ -5407,9 +5407,9 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
goto LskipNewArrayLowering; goto LskipNewArrayLowering;
} }
if (exp.placement) // no need to lower if (exp.placement) // no need to lower
{ {
} }
else if (nargs == 1) else if (nargs == 1)
{ {
auto hook = global.params.tracegc ? Id._d_newarrayTTrace : Id._d_newarrayT; auto hook = global.params.tracegc ? Id._d_newarrayTTrace : Id._d_newarrayT;
@ -5495,7 +5495,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
exp.type = exp.type.pointerTo(); exp.type = exp.type.pointerTo();
if (!exp.placement) if (!exp.placement)
tryLowerToNewItem(exp); tryLowerToNewItem(exp);
} }
else if (tb.ty == Taarray) else if (tb.ty == Taarray)
{ {