Use consistent code for setting FPFeatures from operator constructors.
authorRichard Smith <richard@metafoo.co.uk>
Sun, 16 Aug 2020 22:40:38 +0000 (15:40 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Sun, 16 Aug 2020 22:40:38 +0000 (15:40 -0700)
clang/lib/AST/Expr.cpp

index f5aecfb..e3e5e9d 100644 (file)
@@ -4487,8 +4487,8 @@ BinaryOperator::BinaryOperator(const ASTContext &Ctx, Expr *lhs, Expr *rhs,
   SubExprs[LHS] = lhs;
   SubExprs[RHS] = rhs;
   BinaryOperatorBits.HasFPFeatures = FPFeatures.requiresTrailingStorage();
-  if (BinaryOperatorBits.HasFPFeatures)
-    *getTrailingFPFeatures() = FPFeatures;
+  if (hasStoredFPFeatures())
+    setStoredFPFeatures(FPFeatures);
   setDependence(computeDependence(this));
 }
 
@@ -4504,8 +4504,8 @@ BinaryOperator::BinaryOperator(const ASTContext &Ctx, Expr *lhs, Expr *rhs,
   SubExprs[LHS] = lhs;
   SubExprs[RHS] = rhs;
   BinaryOperatorBits.HasFPFeatures = FPFeatures.requiresTrailingStorage();
-  if (BinaryOperatorBits.HasFPFeatures)
-    *getTrailingFPFeatures() = FPFeatures;
+  if (hasStoredFPFeatures())
+    setStoredFPFeatures(FPFeatures);
   setDependence(computeDependence(this));
 }