@@ -809,7 +809,7 @@ class alignas(void *) Stmt {
809809 LLVM_PREFERRED_TYPE (bool )
810810 uint64_t Value : 1 ;
811811
812- // / The location of the boolean ligeral
812+ // / The location of the boolean ligeral.
813813 LLVM_PREFERRED_TYPE (SourceLocation)
814814 uint64_t Loc : SourceLocation::Bits;
815815 };
@@ -840,7 +840,7 @@ class alignas(void *) Stmt {
840840 LLVM_PREFERRED_TYPE (bool )
841841 uint64_t CapturedByCopyInLambdaWithExplicitObjectParameter : 1 ;
842842
843- // / The location of the "this"
843+ // / The location of the "this".
844844 LLVM_PREFERRED_TYPE (SourceLocation)
845845 uint64_t Loc : SourceLocation::Bits;
846846 };
@@ -856,7 +856,7 @@ class alignas(void *) Stmt {
856856 LLVM_PREFERRED_TYPE (bool )
857857 uint64_t IsThrownVariableInScope : 1 ;
858858
859- // / The location of the "throw"
859+ // / The location of the "throw".
860860 LLVM_PREFERRED_TYPE (SourceLocation)
861861 uint64_t ThrowLoc : SourceLocation::Bits;
862862 };
@@ -901,7 +901,6 @@ class alignas(void *) Stmt {
901901 LLVM_PREFERRED_TYPE (ExprBitfields)
902902 uint64_t : NumExprBits;
903903
904- // / The location where the default initializer expression was used.
905904 LLVM_PREFERRED_TYPE (SourceLocation)
906905 uint64_t RParenLoc : SourceLocation::Bits;
907906 };
@@ -978,7 +977,7 @@ class alignas(void *) Stmt {
978977 LLVM_PREFERRED_TYPE (bool )
979978 uint64_t UsualArrayDeleteWantsSize : 1 ;
980979
981- // / Location of the expression
980+ // / Location of the expression.
982981 LLVM_PREFERRED_TYPE (SourceLocation)
983982 uint64_t Loc : SourceLocation::Bits;
984983 };
@@ -1308,7 +1307,6 @@ class alignas(void *) Stmt {
13081307 LLVM_PREFERRED_TYPE (bool )
13091308 uint64_t IsUnique : 1 ;
13101309
1311- // / The location of the non-type template parameter reference.
13121310 LLVM_PREFERRED_TYPE (SourceLocation)
13131311 uint64_t Loc : SourceLocation::Bits;
13141312 };
@@ -2182,7 +2180,7 @@ class ValueStmt : public Stmt {
21822180class LabelStmt : public ValueStmt {
21832181 LabelDecl *TheDecl;
21842182 Stmt *SubStmt;
2185- bool SideEntry = false ; // FIXME: could improve
2183+ bool SideEntry = false ;
21862184
21872185public:
21882186 // / Build a label statement.
@@ -2545,8 +2543,12 @@ class IfStmt final
25452543class SwitchStmt final : public Stmt,
25462544 private llvm::TrailingObjects<SwitchStmt, Stmt *> {
25472545 friend TrailingObjects;
2546+
25482547 // / Points to a linked list of case and default statements.
25492548 SwitchCase *FirstCase = nullptr ;
2549+
2550+ SourceLocation LParenLoc;
2551+ SourceLocation RParenLoc;
25502552
25512553 // SwitchStmt is followed by several trailing objects,
25522554 // some of which optional. Note that it would be more convenient to
@@ -2567,8 +2569,6 @@ class SwitchStmt final : public Stmt,
25672569 // Always present.
25682570 enum { InitOffset = 0 , BodyOffsetFromCond = 1 };
25692571 enum { NumMandatoryStmtPtr = 2 };
2570- SourceLocation LParenLoc;
2571- SourceLocation RParenLoc;
25722572
25732573 unsigned numTrailingStatements () const {
25742574 return NumMandatoryStmtPtr + hasInitStorage () + hasVarStorage ();
@@ -2754,6 +2754,7 @@ class WhileStmt final : public Stmt,
27542754 //
27552755 enum { VarOffset = 0 , BodyOffsetFromCond = 1 };
27562756 enum { NumMandatoryStmtPtr = 2 };
2757+
27572758 SourceLocation LParenLoc, RParenLoc;
27582759
27592760 unsigned varOffset () const { return VarOffset; }
@@ -2877,6 +2878,7 @@ class DoStmt : public Stmt {
28772878 Stmt *SubExprs[END_EXPR];
28782879 SourceLocation WhileLoc;
28792880 SourceLocation RParenLoc; // Location of final ')' in do stmt condition.
2881+
28802882public:
28812883 DoStmt (Stmt *Body, Expr *Cond, SourceLocation DL, SourceLocation WL,
28822884 SourceLocation RP)
@@ -3187,6 +3189,7 @@ class ReturnStmt final
31873189 : public Stmt,
31883190 private llvm::TrailingObjects<ReturnStmt, const VarDecl *> {
31893191 friend TrailingObjects;
3192+
31903193 // / The return expression.
31913194 Stmt *RetExpr;
31923195
0 commit comments