diff options
author | Melanie Blower <melanie.blower@intel.com> | 2020-06-26 08:45:12 -0700 |
---|---|---|
committer | Melanie Blower <melanie.blower@intel.com> | 2020-06-26 08:47:04 -0700 |
commit | defd43a5b393bb63a902042adf578081b03b171d (patch) | |
tree | e76a89e35e864bb42c3c7b740e5d67fa0df78ac6 /clang/lib/Sema/SemaPseudoObject.cpp | |
parent | 951e43f357ec3ee0ffc570aea9cbf19871696c42 (diff) | |
download | llvm-defd43a5b393bb63a902042adf578081b03b171d.zip llvm-defd43a5b393bb63a902042adf578081b03b171d.tar.gz llvm-defd43a5b393bb63a902042adf578081b03b171d.tar.bz2 |
Revert "Revert "Revert "Modify FPFeatures to use delta not absolute settings"""
This reverts commit 9518763d710bfbbf9315fa88972c55898be44a0e.
Memory sanitizer fails in CGFPOptionsRAII::CGFPOptionsRAII dtor
Diffstat (limited to 'clang/lib/Sema/SemaPseudoObject.cpp')
-rw-r--r-- | clang/lib/Sema/SemaPseudoObject.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/clang/lib/Sema/SemaPseudoObject.cpp b/clang/lib/Sema/SemaPseudoObject.cpp index d17599a..da77720 100644 --- a/clang/lib/Sema/SemaPseudoObject.cpp +++ b/clang/lib/Sema/SemaPseudoObject.cpp @@ -130,7 +130,7 @@ namespace { return UnaryOperator::Create( S.Context, e, uop->getOpcode(), uop->getType(), uop->getValueKind(), uop->getObjectKind(), uop->getOperatorLoc(), uop->canOverflow(), - S.CurFPFeatureOverrides()); + S.CurFPFeatures); } if (GenericSelectionExpr *gse = dyn_cast<GenericSelectionExpr>(e)) { @@ -446,10 +446,9 @@ PseudoOpBuilder::buildAssignmentOperation(Scope *Sc, SourceLocation opcLoc, ExprResult result; if (opcode == BO_Assign) { result = semanticRHS; - syntactic = BinaryOperator::Create(S.Context, syntacticLHS, capturedRHS, - opcode, capturedRHS->getType(), - capturedRHS->getValueKind(), OK_Ordinary, - opcLoc, S.CurFPFeatureOverrides()); + syntactic = BinaryOperator::Create( + S.Context, syntacticLHS, capturedRHS, opcode, capturedRHS->getType(), + capturedRHS->getValueKind(), OK_Ordinary, opcLoc, S.CurFPFeatures); } else { ExprResult opLHS = buildGet(); @@ -463,9 +462,8 @@ PseudoOpBuilder::buildAssignmentOperation(Scope *Sc, SourceLocation opcLoc, syntactic = CompoundAssignOperator::Create( S.Context, syntacticLHS, capturedRHS, opcode, result.get()->getType(), - result.get()->getValueKind(), OK_Ordinary, opcLoc, - S.CurFPFeatureOverrides(), opLHS.get()->getType(), - result.get()->getType()); + result.get()->getValueKind(), OK_Ordinary, opcLoc, S.CurFPFeatures, + opLHS.get()->getType(), result.get()->getType()); } // The result of the assignment, if not void, is the value set into @@ -533,7 +531,7 @@ PseudoOpBuilder::buildIncDecOperation(Scope *Sc, SourceLocation opcLoc, ? S.Context.getTypeSize(resultType) >= S.Context.getTypeSize(S.Context.IntTy) : false, - S.CurFPFeatureOverrides()); + S.CurFPFeatures); return complete(syntactic); } @@ -1555,7 +1553,7 @@ ExprResult Sema::checkPseudoObjectIncDec(Scope *Sc, SourceLocation opcLoc, if (op->isTypeDependent()) return UnaryOperator::Create(Context, op, opcode, Context.DependentTy, VK_RValue, OK_Ordinary, opcLoc, false, - CurFPFeatureOverrides()); + CurFPFeatures); assert(UnaryOperator::isIncrementDecrementOp(opcode)); Expr *opaqueRef = op->IgnoreParens(); @@ -1586,7 +1584,7 @@ ExprResult Sema::checkPseudoObjectAssignment(Scope *S, SourceLocation opcLoc, if (LHS->isTypeDependent() || RHS->isTypeDependent()) return BinaryOperator::Create(Context, LHS, RHS, opcode, Context.DependentTy, VK_RValue, OK_Ordinary, - opcLoc, CurFPFeatureOverrides()); + opcLoc, CurFPFeatures); // Filter out non-overload placeholder types in the RHS. if (RHS->getType()->isNonOverloadPlaceholderType()) { @@ -1642,7 +1640,7 @@ Expr *Sema::recreateSyntacticForm(PseudoObjectExpr *E) { return UnaryOperator::Create(Context, op, uop->getOpcode(), uop->getType(), uop->getValueKind(), uop->getObjectKind(), uop->getOperatorLoc(), uop->canOverflow(), - CurFPFeatureOverrides()); + CurFPFeatures); } else if (CompoundAssignOperator *cop = dyn_cast<CompoundAssignOperator>(syntax)) { Expr *lhs = stripOpaqueValuesFromPseudoObjectRef(*this, cop->getLHS()); @@ -1650,7 +1648,7 @@ Expr *Sema::recreateSyntacticForm(PseudoObjectExpr *E) { return CompoundAssignOperator::Create( Context, lhs, rhs, cop->getOpcode(), cop->getType(), cop->getValueKind(), cop->getObjectKind(), cop->getOperatorLoc(), - CurFPFeatureOverrides(), cop->getComputationLHSType(), + CurFPFeatures, cop->getComputationLHSType(), cop->getComputationResultType()); } else if (BinaryOperator *bop = dyn_cast<BinaryOperator>(syntax)) { @@ -1659,7 +1657,7 @@ Expr *Sema::recreateSyntacticForm(PseudoObjectExpr *E) { return BinaryOperator::Create(Context, lhs, rhs, bop->getOpcode(), bop->getType(), bop->getValueKind(), bop->getObjectKind(), bop->getOperatorLoc(), - CurFPFeatureOverrides()); + CurFPFeatures); } else if (isa<CallExpr>(syntax)) { return syntax; |