diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -3439,7 +3439,9 @@ class BinaryOperator : public Expr { enum { LHS, RHS, END_EXPR }; Stmt *SubExprs[END_EXPR]; - + /// This is only meaningful for operations on floating point + /// types and 0 otherwise. + FPOptions FPFeatures; public: typedef BinaryOperatorKind Opcode; @@ -3452,9 +3454,9 @@ (lhs->isInstantiationDependent() || rhs->isInstantiationDependent()), (lhs->containsUnexpandedParameterPack() || - rhs->containsUnexpandedParameterPack())) { + rhs->containsUnexpandedParameterPack())), + FPFeatures(FPFeatures) { BinaryOperatorBits.Opc = opc; - BinaryOperatorBits.FPFeatures = FPFeatures.getInt(); BinaryOperatorBits.OpLoc = opLoc; SubExprs[LHS] = lhs; SubExprs[RHS] = rhs; @@ -3610,11 +3612,11 @@ // Set the FP contractability status of this operator. Only meaningful for // operations on floating point types. void setFPFeatures(FPOptions F) { - BinaryOperatorBits.FPFeatures = F.getInt(); + FPFeatures = F; } FPOptions getFPFeatures() const { - return FPOptions(BinaryOperatorBits.FPFeatures); + return FPFeatures; } // Get the FP contractability status of this operator. Only meaningful for @@ -3637,9 +3639,9 @@ (lhs->isInstantiationDependent() || rhs->isInstantiationDependent()), (lhs->containsUnexpandedParameterPack() || - rhs->containsUnexpandedParameterPack())) { + rhs->containsUnexpandedParameterPack())), + FPFeatures(FPFeatures) { BinaryOperatorBits.Opc = opc; - BinaryOperatorBits.FPFeatures = FPFeatures.getInt(); BinaryOperatorBits.OpLoc = opLoc; SubExprs[LHS] = lhs; SubExprs[RHS] = rhs; diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h --- a/clang/include/clang/AST/Stmt.h +++ b/clang/include/clang/AST/Stmt.h @@ -531,10 +531,6 @@ unsigned Opc : 6; - /// This is only meaningful for operations on floating point - /// types and 0 otherwise. - unsigned FPFeatures : 8; - SourceLocation OpLoc; };