@@ -732,11 +732,11 @@ class CPPCHECKLIB Token {
732732 setFlag (fIsTemplate , b);
733733 }
734734
735- bool isSimplifiedScope () const {
736- return getFlag (fIsSimplifedScope );
735+ bool isSimplifiedIfInitStmt () const {
736+ return getFlag (fIsSimplifiedIfInitStmt );
737737 }
738- void isSimplifiedScope (bool b) {
739- setFlag (fIsSimplifedScope , b);
738+ void isSimplifiedIfInitStmt (bool b) {
739+ setFlag (fIsSimplifiedIfInitStmt , b);
740740 }
741741
742742 bool isFinalType () const {
@@ -767,6 +767,14 @@ class CPPCHECKLIB Token {
767767 setFlag (fIsAnonymous , b);
768768 }
769769
770+ bool isInsertedBrace () const {
771+ return getFlag (fIsInsertedBrace );
772+ }
773+ Token* isInsertedBrace (bool b) {
774+ setFlag (fIsInsertedBrace , b);
775+ return this ;
776+ }
777+
770778 // cppcheck-suppress unusedFunction
771779 bool isBitfield () const {
772780 return mImpl ->mBits >= 0 ;
@@ -1498,7 +1506,7 @@ class CPPCHECKLIB Token {
14981506 fIsImplicitInt = (1ULL << 33 ), // Is "int" token implicitly added?
14991507 fIsInline = (1ULL << 34 ), // Is this a inline type
15001508 fIsTemplate = (1ULL << 35 ),
1501- fIsSimplifedScope = (1ULL << 36 ), // scope added when simplifying e.g. if (int i = ...; ...)
1509+ fIsSimplifiedIfInitStmt = (1ULL << 36 ), // simplified if/switch/while init statement e.g. if (int i = ...; ...) => { int i = ...; if (..) .. }
15021510 fIsRemovedVoidParameter = (1ULL << 37 ), // A void function parameter has been removed
15031511 fIsIncompleteConstant = (1ULL << 38 ),
15041512 fIsRestrict = (1ULL << 39 ), // Is this a restrict pointer type
@@ -1508,6 +1516,7 @@ class CPPCHECKLIB Token {
15081516 fIsInitComma = (1ULL << 43 ), // Is this comma located inside some {..}. i.e: {1,2,3,4}
15091517 fIsInitBracket = (1ULL << 44 ), // Is this bracket used as a part of variable initialization i.e: int a{5}, b(2);
15101518 fIsAnonymous = (1ULL << 45 ), // Is this a token added for an unnamed member
1519+ fIsInsertedBrace = (1ULL << 46 ), // brace added when simplifying e.g. if (x) f(); => if (x) { f(); }
15111520 };
15121521
15131522 enum : std::uint8_t {
0 commit comments