diff options
author | Melanie Blower <melanie.blower@intel.com> | 2020-05-01 10:32:06 -0700 |
---|---|---|
committer | Melanie Blower <melanie.blower@intel.com> | 2020-05-04 05:51:25 -0700 |
commit | f5360d4bb3376347479d86547d21b95d80be786d (patch) | |
tree | 2b0aea0b2e02617572187f640570a8c9fc1c1f92 /clang/lib/Sema/SemaPseudoObject.cpp | |
parent | 67b466deda1dcee2ba4bea8ad3579415df678249 (diff) | |
download | llvm-f5360d4bb3376347479d86547d21b95d80be786d.zip llvm-f5360d4bb3376347479d86547d21b95d80be786d.tar.gz llvm-f5360d4bb3376347479d86547d21b95d80be786d.tar.bz2 |
Reapply "Add support for #pragma float_control" with buildbot fixes
Add support for #pragma float_control
Reviewers: rjmccall, erichkeane, sepavloff
Differential Revision: https://reviews.llvm.org/D72841
This reverts commit fce82c0ed310174fe48e2402ac731b6340098389.
Diffstat (limited to 'clang/lib/Sema/SemaPseudoObject.cpp')
-rw-r--r-- | clang/lib/Sema/SemaPseudoObject.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/clang/lib/Sema/SemaPseudoObject.cpp b/clang/lib/Sema/SemaPseudoObject.cpp index 0ed4522..da77720 100644 --- a/clang/lib/Sema/SemaPseudoObject.cpp +++ b/clang/lib/Sema/SemaPseudoObject.cpp @@ -127,12 +127,10 @@ namespace { if (UnaryOperator *uop = dyn_cast<UnaryOperator>(e)) { assert(uop->getOpcode() == UO_Extension); e = rebuild(uop->getSubExpr()); - return new (S.Context) UnaryOperator(e, uop->getOpcode(), - uop->getType(), - uop->getValueKind(), - uop->getObjectKind(), - uop->getOperatorLoc(), - uop->canOverflow()); + return UnaryOperator::Create( + S.Context, e, uop->getOpcode(), uop->getType(), uop->getValueKind(), + uop->getObjectKind(), uop->getOperatorLoc(), uop->canOverflow(), + S.CurFPFeatures); } if (GenericSelectionExpr *gse = dyn_cast<GenericSelectionExpr>(e)) { @@ -526,12 +524,14 @@ PseudoOpBuilder::buildIncDecOperation(Scope *Sc, SourceLocation opcLoc, (result.get()->isTypeDependent() || CanCaptureValue(result.get()))) setResultToLastSemantic(); - UnaryOperator *syntactic = new (S.Context) UnaryOperator( - syntacticOp, opcode, resultType, VK_LValue, OK_Ordinary, opcLoc, - !resultType->isDependentType() - ? S.Context.getTypeSize(resultType) >= - S.Context.getTypeSize(S.Context.IntTy) - : false); + UnaryOperator *syntactic = + UnaryOperator::Create(S.Context, syntacticOp, opcode, resultType, + VK_LValue, OK_Ordinary, opcLoc, + !resultType->isDependentType() + ? S.Context.getTypeSize(resultType) >= + S.Context.getTypeSize(S.Context.IntTy) + : false, + S.CurFPFeatures); return complete(syntactic); } @@ -1551,8 +1551,9 @@ ExprResult Sema::checkPseudoObjectIncDec(Scope *Sc, SourceLocation opcLoc, UnaryOperatorKind opcode, Expr *op) { // Do nothing if the operand is dependent. if (op->isTypeDependent()) - return new (Context) UnaryOperator(op, opcode, Context.DependentTy, - VK_RValue, OK_Ordinary, opcLoc, false); + return UnaryOperator::Create(Context, op, opcode, Context.DependentTy, + VK_RValue, OK_Ordinary, opcLoc, false, + CurFPFeatures); assert(UnaryOperator::isIncrementDecrementOp(opcode)); Expr *opaqueRef = op->IgnoreParens(); @@ -1636,9 +1637,10 @@ Expr *Sema::recreateSyntacticForm(PseudoObjectExpr *E) { Expr *syntax = E->getSyntacticForm(); if (UnaryOperator *uop = dyn_cast<UnaryOperator>(syntax)) { Expr *op = stripOpaqueValuesFromPseudoObjectRef(*this, uop->getSubExpr()); - return new (Context) UnaryOperator( - op, uop->getOpcode(), uop->getType(), uop->getValueKind(), - uop->getObjectKind(), uop->getOperatorLoc(), uop->canOverflow()); + return UnaryOperator::Create(Context, op, uop->getOpcode(), uop->getType(), + uop->getValueKind(), uop->getObjectKind(), + uop->getOperatorLoc(), uop->canOverflow(), + CurFPFeatures); } else if (CompoundAssignOperator *cop = dyn_cast<CompoundAssignOperator>(syntax)) { Expr *lhs = stripOpaqueValuesFromPseudoObjectRef(*this, cop->getLHS()); |