@@ -3440,11 +3440,9 @@ class CastExpr : public Expr {
3440
3440
}
3441
3441
CXXBaseSpecifier **path_buffer ();
3442
3442
3443
- friend class ASTStmtReader ;
3444
-
3445
3443
protected:
3446
3444
CastExpr (StmtClass SC, QualType ty, ExprValueKind VK, const CastKind kind,
3447
- Expr *op, unsigned BasePathSize, bool HasFPFeatures )
3445
+ Expr *op, unsigned BasePathSize)
3448
3446
: Expr(SC, ty, VK, OK_Ordinary), Op(op) {
3449
3447
CastExprBits.Kind = kind;
3450
3448
CastExprBits.PartOfExplicitCast = false ;
@@ -3453,27 +3451,17 @@ class CastExpr : public Expr {
3453
3451
" BasePathSize overflow!" );
3454
3452
setDependence (computeDependence (this ));
3455
3453
assert (CastConsistency ());
3456
- CastExprBits.HasFPFeatures = HasFPFeatures;
3457
3454
}
3458
3455
3459
3456
// / Construct an empty cast.
3460
- CastExpr (StmtClass SC, EmptyShell Empty, unsigned BasePathSize,
3461
- bool HasFPFeatures)
3462
- : Expr(SC, Empty) {
3457
+ CastExpr (StmtClass SC, EmptyShell Empty, unsigned BasePathSize)
3458
+ : Expr(SC, Empty) {
3463
3459
CastExprBits.PartOfExplicitCast = false ;
3464
3460
CastExprBits.BasePathSize = BasePathSize;
3465
- CastExprBits.HasFPFeatures = HasFPFeatures;
3466
3461
assert ((CastExprBits.BasePathSize == BasePathSize) &&
3467
3462
" BasePathSize overflow!" );
3468
3463
}
3469
3464
3470
- // / Return a pointer to the trailing FPOptions.
3471
- // / \pre hasStoredFPFeatures() == true
3472
- FPOptionsOverride *getTrailingFPFeatures ();
3473
- const FPOptionsOverride *getTrailingFPFeatures () const {
3474
- return const_cast <CastExpr *>(this )->getTrailingFPFeatures ();
3475
- }
3476
-
3477
3465
public:
3478
3466
CastKind getCastKind () const { return (CastKind) CastExprBits.Kind ; }
3479
3467
void setCastKind (CastKind K) { CastExprBits.Kind = K; }
@@ -3518,28 +3506,6 @@ class CastExpr : public Expr {
3518
3506
return getTargetFieldForToUnionCast (getType (), getSubExpr ()->getType ());
3519
3507
}
3520
3508
3521
- bool hasStoredFPFeatures () const { return CastExprBits.HasFPFeatures ; }
3522
-
3523
- // / Get FPOptionsOverride from trailing storage.
3524
- FPOptionsOverride getStoredFPFeatures () const {
3525
- assert (hasStoredFPFeatures ());
3526
- return *getTrailingFPFeatures ();
3527
- }
3528
-
3529
- // Get the FP features status of this operation. Only meaningful for
3530
- // operations on floating point types.
3531
- FPOptions getFPFeaturesInEffect (const LangOptions &LO) const {
3532
- if (hasStoredFPFeatures ())
3533
- return getStoredFPFeatures ().applyOverrides (LO);
3534
- return FPOptions::defaultWithoutTrailingStorage (LO);
3535
- }
3536
-
3537
- FPOptionsOverride getFPFeatures () const {
3538
- if (hasStoredFPFeatures ())
3539
- return getStoredFPFeatures ();
3540
- return FPOptionsOverride ();
3541
- }
3542
-
3543
3509
static const FieldDecl *getTargetFieldForToUnionCast (QualType unionType,
3544
3510
QualType opType);
3545
3511
static const FieldDecl *getTargetFieldForToUnionCast (const RecordDecl *RD,
@@ -3577,35 +3543,21 @@ class CastExpr : public Expr {
3577
3543
// / @endcode
3578
3544
class ImplicitCastExpr final
3579
3545
: public CastExpr,
3580
- private llvm::TrailingObjects<ImplicitCastExpr, CXXBaseSpecifier *,
3581
- FPOptionsOverride> {
3546
+ private llvm::TrailingObjects<ImplicitCastExpr, CXXBaseSpecifier *> {
3582
3547
3583
3548
ImplicitCastExpr (QualType ty, CastKind kind, Expr *op,
3584
- unsigned BasePathLength, FPOptionsOverride FPO,
3585
- ExprValueKind VK)
3586
- : CastExpr(ImplicitCastExprClass, ty, VK, kind, op, BasePathLength,
3587
- FPO.requiresTrailingStorage()) {
3588
- if (hasStoredFPFeatures ())
3589
- *getTrailingFPFeatures () = FPO;
3590
- }
3549
+ unsigned BasePathLength, ExprValueKind VK)
3550
+ : CastExpr(ImplicitCastExprClass, ty, VK, kind, op, BasePathLength) { }
3591
3551
3592
3552
// / Construct an empty implicit cast.
3593
- explicit ImplicitCastExpr (EmptyShell Shell, unsigned PathSize,
3594
- bool HasFPFeatures)
3595
- : CastExpr(ImplicitCastExprClass, Shell, PathSize, HasFPFeatures) {}
3596
-
3597
- unsigned numTrailingObjects (OverloadToken<CXXBaseSpecifier *>) const {
3598
- return path_size ();
3599
- }
3553
+ explicit ImplicitCastExpr (EmptyShell Shell, unsigned PathSize)
3554
+ : CastExpr(ImplicitCastExprClass, Shell, PathSize) { }
3600
3555
3601
3556
public:
3602
3557
enum OnStack_t { OnStack };
3603
3558
ImplicitCastExpr (OnStack_t _, QualType ty, CastKind kind, Expr *op,
3604
- ExprValueKind VK, FPOptionsOverride FPO)
3605
- : CastExpr(ImplicitCastExprClass, ty, VK, kind, op, 0 ,
3606
- FPO.requiresTrailingStorage()) {
3607
- if (hasStoredFPFeatures ())
3608
- *getTrailingFPFeatures () = FPO;
3559
+ ExprValueKind VK)
3560
+ : CastExpr(ImplicitCastExprClass, ty, VK, kind, op, 0 ) {
3609
3561
}
3610
3562
3611
3563
bool isPartOfExplicitCast () const { return CastExprBits.PartOfExplicitCast ; }
@@ -3616,10 +3568,10 @@ class ImplicitCastExpr final
3616
3568
static ImplicitCastExpr *Create (const ASTContext &Context, QualType T,
3617
3569
CastKind Kind, Expr *Operand,
3618
3570
const CXXCastPath *BasePath,
3619
- ExprValueKind Cat, FPOptionsOverride FPO );
3571
+ ExprValueKind Cat);
3620
3572
3621
3573
static ImplicitCastExpr *CreateEmpty (const ASTContext &Context,
3622
- unsigned PathSize, bool HasFPFeatures );
3574
+ unsigned PathSize);
3623
3575
3624
3576
SourceLocation getBeginLoc () const LLVM_READONLY {
3625
3577
return getSubExpr ()->getBeginLoc ();
@@ -3660,14 +3612,12 @@ class ExplicitCastExpr : public CastExpr {
3660
3612
protected:
3661
3613
ExplicitCastExpr (StmtClass SC, QualType exprTy, ExprValueKind VK,
3662
3614
CastKind kind, Expr *op, unsigned PathSize,
3663
- bool HasFPFeatures, TypeSourceInfo *writtenTy)
3664
- : CastExpr(SC, exprTy, VK, kind, op, PathSize, HasFPFeatures),
3665
- TInfo (writtenTy) {}
3615
+ TypeSourceInfo *writtenTy)
3616
+ : CastExpr(SC, exprTy, VK, kind, op, PathSize), TInfo(writtenTy) {}
3666
3617
3667
3618
// / Construct an empty explicit cast.
3668
- ExplicitCastExpr (StmtClass SC, EmptyShell Shell, unsigned PathSize,
3669
- bool HasFPFeatures)
3670
- : CastExpr(SC, Shell, PathSize, HasFPFeatures) {}
3619
+ ExplicitCastExpr (StmtClass SC, EmptyShell Shell, unsigned PathSize)
3620
+ : CastExpr(SC, Shell, PathSize) { }
3671
3621
3672
3622
public:
3673
3623
// / getTypeInfoAsWritten - Returns the type source info for the type
@@ -3690,38 +3640,29 @@ class ExplicitCastExpr : public CastExpr {
3690
3640
// / (Type)expr. For example: @c (int)f.
3691
3641
class CStyleCastExpr final
3692
3642
: public ExplicitCastExpr,
3693
- private llvm::TrailingObjects<CStyleCastExpr, CXXBaseSpecifier *,
3694
- FPOptionsOverride> {
3643
+ private llvm::TrailingObjects<CStyleCastExpr, CXXBaseSpecifier *> {
3695
3644
SourceLocation LPLoc; // the location of the left paren
3696
3645
SourceLocation RPLoc; // the location of the right paren
3697
3646
3698
3647
CStyleCastExpr (QualType exprTy, ExprValueKind vk, CastKind kind, Expr *op,
3699
- unsigned PathSize, FPOptionsOverride FPO,
3700
- TypeSourceInfo *writtenTy, SourceLocation l, SourceLocation r)
3701
- : ExplicitCastExpr(CStyleCastExprClass, exprTy, vk, kind, op, PathSize,
3702
- FPO.requiresTrailingStorage(), writtenTy),
3703
- LPLoc (l), RPLoc(r) {
3704
- if (hasStoredFPFeatures ())
3705
- *getTrailingFPFeatures () = FPO;
3706
- }
3648
+ unsigned PathSize, TypeSourceInfo *writtenTy,
3649
+ SourceLocation l, SourceLocation r)
3650
+ : ExplicitCastExpr(CStyleCastExprClass, exprTy, vk, kind, op, PathSize,
3651
+ writtenTy), LPLoc(l), RPLoc(r) {}
3707
3652
3708
3653
// / Construct an empty C-style explicit cast.
3709
- explicit CStyleCastExpr (EmptyShell Shell, unsigned PathSize,
3710
- bool HasFPFeatures)
3711
- : ExplicitCastExpr(CStyleCastExprClass, Shell, PathSize, HasFPFeatures) {}
3712
-
3713
- unsigned numTrailingObjects (OverloadToken<CXXBaseSpecifier *>) const {
3714
- return path_size ();
3715
- }
3654
+ explicit CStyleCastExpr (EmptyShell Shell, unsigned PathSize)
3655
+ : ExplicitCastExpr(CStyleCastExprClass, Shell, PathSize) { }
3716
3656
3717
3657
public:
3718
- static CStyleCastExpr *
3719
- Create (const ASTContext &Context, QualType T, ExprValueKind VK, CastKind K,
3720
- Expr *Op, const CXXCastPath *BasePath, FPOptionsOverride FPO,
3721
- TypeSourceInfo *WrittenTy, SourceLocation L, SourceLocation R);
3658
+ static CStyleCastExpr *Create (const ASTContext &Context, QualType T,
3659
+ ExprValueKind VK, CastKind K,
3660
+ Expr *Op, const CXXCastPath *BasePath,
3661
+ TypeSourceInfo *WrittenTy, SourceLocation L,
3662
+ SourceLocation R);
3722
3663
3723
3664
static CStyleCastExpr *CreateEmpty (const ASTContext &Context,
3724
- unsigned PathSize, bool HasFPFeatures );
3665
+ unsigned PathSize);
3725
3666
3726
3667
SourceLocation getLParenLoc () const { return LPLoc; }
3727
3668
void setLParenLoc (SourceLocation L) { LPLoc = L; }
0 commit comments