@@ -4631,7 +4631,6 @@ class ShuffleVectorExpr : public Expr {
46314631 // indices. The number of values in this list is always
46324632 // 2+the number of indices in the vector type.
46334633 Stmt **SubExprs;
4634- unsigned NumExprs;
46354634
46364635public:
46374636 ShuffleVectorExpr (const ASTContext &C, ArrayRef<Expr*> args, QualType Type,
@@ -4657,36 +4656,41 @@ class ShuffleVectorExpr : public Expr {
46574656 // / getNumSubExprs - Return the size of the SubExprs array. This includes the
46584657 // / constant expression, the actual arguments passed in, and the function
46594658 // / pointers.
4660- unsigned getNumSubExprs () const { return NumExprs; }
4659+ unsigned getNumSubExprs () const { return ShuffleVectorExprBits. NumExprs ; }
46614660
46624661 // / Retrieve the array of expressions.
46634662 Expr **getSubExprs () { return reinterpret_cast <Expr **>(SubExprs); }
46644663
46654664 // / getExpr - Return the Expr at the specified index.
46664665 Expr *getExpr (unsigned Index) {
4667- assert ((Index < NumExprs) && " Arg access out of range!" );
4666+ assert ((Index < ShuffleVectorExprBits.NumExprs ) &&
4667+ " Arg access out of range!" );
46684668 return cast<Expr>(SubExprs[Index]);
46694669 }
46704670 const Expr *getExpr (unsigned Index) const {
4671- assert ((Index < NumExprs) && " Arg access out of range!" );
4671+ assert ((Index < ShuffleVectorExprBits.NumExprs ) &&
4672+ " Arg access out of range!" );
46724673 return cast<Expr>(SubExprs[Index]);
46734674 }
46744675
46754676 void setExprs (const ASTContext &C, ArrayRef<Expr *> Exprs);
46764677
46774678 llvm::APSInt getShuffleMaskIdx (unsigned N) const {
4678- assert ((N < NumExprs - 2 ) && " Shuffle idx out of range!" );
4679+ assert ((N < ShuffleVectorExprBits.NumExprs - 2 ) &&
4680+ " Shuffle idx out of range!" );
46794681 assert (isa<ConstantExpr>(getExpr (N + 2 )) &&
46804682 " Index expression must be a ConstantExpr" );
46814683 return cast<ConstantExpr>(getExpr (N + 2 ))->getAPValueResult ().getInt ();
46824684 }
46834685
46844686 // Iterators
46854687 child_range children () {
4686- return child_range (&SubExprs[0 ], &SubExprs[0 ]+NumExprs);
4688+ return child_range (&SubExprs[0 ],
4689+ &SubExprs[0 ] + ShuffleVectorExprBits.NumExprs );
46874690 }
46884691 const_child_range children () const {
4689- return const_child_range (&SubExprs[0 ], &SubExprs[0 ] + NumExprs);
4692+ return const_child_range (&SubExprs[0 ],
4693+ &SubExprs[0 ] + ShuffleVectorExprBits.NumExprs );
46904694 }
46914695};
46924696
@@ -4828,13 +4832,13 @@ class ChooseExpr : public Expr {
48284832 enum { COND, LHS, RHS, END_EXPR };
48294833 Stmt* SubExprs[END_EXPR]; // Left/Middle/Right hand sides.
48304834 SourceLocation BuiltinLoc, RParenLoc;
4831- bool CondIsTrue;
4835+
48324836public:
48334837 ChooseExpr (SourceLocation BLoc, Expr *cond, Expr *lhs, Expr *rhs, QualType t,
48344838 ExprValueKind VK, ExprObjectKind OK, SourceLocation RP,
48354839 bool condIsTrue)
4836- : Expr(ChooseExprClass, t, VK, OK), BuiltinLoc(BLoc), RParenLoc(RP),
4837- CondIsTrue ( condIsTrue) {
4840+ : Expr(ChooseExprClass, t, VK, OK), BuiltinLoc(BLoc), RParenLoc(RP) {
4841+ ChooseExprBits. CondIsTrue = condIsTrue;
48384842 SubExprs[COND] = cond;
48394843 SubExprs[LHS] = lhs;
48404844 SubExprs[RHS] = rhs;
@@ -4850,9 +4854,9 @@ class ChooseExpr : public Expr {
48504854 bool isConditionTrue () const {
48514855 assert (!isConditionDependent () &&
48524856 " Dependent condition isn't true or false" );
4853- return CondIsTrue;
4857+ return ChooseExprBits. CondIsTrue ;
48544858 }
4855- void setIsConditionTrue (bool isTrue) { CondIsTrue = isTrue; }
4859+ void setIsConditionTrue (bool isTrue) { ChooseExprBits. CondIsTrue = isTrue; }
48564860
48574861 bool isConditionDependent () const {
48584862 return getCond ()->isTypeDependent () || getCond ()->isValueDependent ();
0 commit comments