@@ -2919,19 +2919,19 @@ class CallExpr : public Expr {
29192919 // A bit in CallExprBitfields indicates if source locations are presents.
29202920
29212921protected:
2922- static constexpr unsigned offsetToTrailingObjects = 32 ;
2922+ static constexpr unsigned OffsetToTrailingObjects = 32 ;
29232923 template <typename T>
29242924 static constexpr unsigned
29252925 sizeToAllocateForCallExprSubclass (unsigned SizeOfTrailingObjects) {
2926- static_assert (sizeof (T) <= CallExpr::offsetToTrailingObjects );
2927- return SizeOfTrailingObjects + CallExpr::offsetToTrailingObjects ;
2926+ static_assert (sizeof (T) <= CallExpr::OffsetToTrailingObjects );
2927+ return SizeOfTrailingObjects + CallExpr::OffsetToTrailingObjects ;
29282928 }
29292929
29302930private:
29312931 // / Return a pointer to the start of the trailing array of "Stmt *".
29322932 Stmt **getTrailingStmts () {
29332933 return reinterpret_cast <Stmt **>(reinterpret_cast <char *>(this ) +
2934- offsetToTrailingObjects );
2934+ OffsetToTrailingObjects );
29352935 }
29362936 Stmt *const *getTrailingStmts () const {
29372937 return const_cast <CallExpr *>(this )->getTrailingStmts ();
@@ -2943,7 +2943,7 @@ class CallExpr : public Expr {
29432943
29442944 size_t getOffsetOfTrailingFPFeatures () const {
29452945 assert (hasStoredFPFeatures ());
2946- return offsetToTrailingObjects + getSizeOfTrailingStmts ();
2946+ return OffsetToTrailingObjects + getSizeOfTrailingStmts ();
29472947 }
29482948
29492949public:
@@ -2990,13 +2990,13 @@ class CallExpr : public Expr {
29902990 FPOptionsOverride *getTrailingFPFeatures () {
29912991 assert (hasStoredFPFeatures ());
29922992 return reinterpret_cast <FPOptionsOverride *>(
2993- reinterpret_cast <char *>(this ) + offsetToTrailingObjects +
2993+ reinterpret_cast <char *>(this ) + OffsetToTrailingObjects +
29942994 getSizeOfTrailingStmts ());
29952995 }
29962996 const FPOptionsOverride *getTrailingFPFeatures () const {
29972997 assert (hasStoredFPFeatures ());
29982998 return reinterpret_cast <const FPOptionsOverride *>(
2999- reinterpret_cast <const char *>(this ) + offsetToTrailingObjects +
2999+ reinterpret_cast <const char *>(this ) + OffsetToTrailingObjects +
30003000 getSizeOfTrailingStmts ());
30013001 }
30023002
@@ -3217,11 +3217,11 @@ class CallExpr : public Expr {
32173217
32183218 SourceLocation getBeginLoc () const {
32193219 if (CallExprBits.HasTrailingSourceLoc ) {
3220- assert (CallExprBits.HasTrailingSourceLoc && " No trailing source loc" );
3221- static_assert (sizeof (CallExpr) <=
3222- offsetToTrailingObjects + sizeof (SourceLocation));
3223- return *reinterpret_cast <const SourceLocation *>(
3224- reinterpret_cast <const char *>(this ) + sizeof (CallExpr ));
3220+ assert (CallExprBits.HasTrailingSourceLoc && " No trailing source loc" );
3221+ static_assert (sizeof (CallExpr) <=
3222+ OffsetToTrailingObjects + sizeof (SourceLocation));
3223+ return *reinterpret_cast <const SourceLocation *>(
3224+ reinterpret_cast <const char *>(this + 1 ));
32253225 }
32263226
32273227 if (usesMemberSyntax ()) {
@@ -3232,9 +3232,7 @@ class CallExpr : public Expr {
32323232 return getCallee ()->getBeginLoc ();
32333233 }
32343234
3235- SourceLocation getEndLoc () const {
3236- return getRParenLoc ();
3237- }
3235+ SourceLocation getEndLoc () const { return getRParenLoc (); }
32383236
32393237private:
32403238 friend class ASTStmtReader ;
@@ -3248,10 +3246,10 @@ class CallExpr : public Expr {
32483246 assert (getStmtClass () == CallExprClass &&
32493247 " Calling setTrailingSourceLocs on a subclass of CallExpr" );
32503248 static_assert (sizeof (CallExpr) <=
3251- offsetToTrailingObjects + 2 * sizeof (SourceLocation));
3249+ OffsetToTrailingObjects + sizeof (SourceLocation));
32523250
3253- SourceLocation *Locs = reinterpret_cast <SourceLocation *>(
3254- reinterpret_cast <char *>(this ) + sizeof (CallExpr ));
3251+ SourceLocation *Locs =
3252+ reinterpret_cast <SourceLocation *>( reinterpret_cast < char *>(this + 1 ));
32553253 new (Locs) SourceLocation (getBeginLoc ());
32563254 CallExprBits.HasTrailingSourceLoc = true ;
32573255 }
0 commit comments