@@ -560,6 +560,12 @@ class CPPCHECKLIB Token {
560
560
void isAttributeMaybeUnused (const bool value) {
561
561
setFlag (fIsAttributeMaybeUnused , value);
562
562
}
563
+ bool isAttributeFallthrough () const {
564
+ return getFlag (fIsAttributeFallthrough );
565
+ }
566
+ void isAttributeFallthrough (const bool value) {
567
+ setFlag (fIsAttributeFallthrough , value);
568
+ }
563
569
std::vector<std::string> getAttributeAlignas () const {
564
570
return mImpl ->mAttributeAlignas ? *mImpl ->mAttributeAlignas : std::vector<std::string>();
565
571
}
@@ -1394,31 +1400,32 @@ class CPPCHECKLIB Token {
1394
1400
fIsAttributeExport = (1ULL << 16 ), // __attribute__((__visibility__("default"))), __declspec(dllexport)
1395
1401
fIsAttributeMaybeUnused = (1ULL << 17 ), // [[maybe_unused]]
1396
1402
fIsAttributeNodiscard = (1ULL << 18 ), // __attribute__ ((warn_unused_result)), [[nodiscard]]
1397
- fIsControlFlowKeyword = (1ULL << 19 ), // if/switch/while/...
1398
- fIsOperatorKeyword = (1ULL << 20 ), // operator=, etc
1399
- fIsComplex = (1ULL << 21 ), // complex/_Complex type
1400
- fIsEnumType = (1ULL << 22 ), // enumeration type
1401
- fIsName = (1ULL << 23 ),
1402
- fIsLiteral = (1ULL << 24 ),
1403
- fIsTemplateArg = (1ULL << 25 ),
1404
- fAtAddress = (1ULL << 26 ), // @ 0x4000
1405
- fIncompleteVar = (1ULL << 27 ),
1406
- fConstexpr = (1ULL << 28 ),
1407
- fExternC = (1ULL << 29 ),
1408
- fIsSplitVarDeclComma = (1ULL << 30 ), // set to true when variable declarations are split up ('int a,b;' => 'int a; int b;')
1409
- fIsSplitVarDeclEq = (1ULL << 31 ), // set to true when variable declaration with initialization is split up ('int a=5;' => 'int a; a=5;')
1410
- fIsImplicitInt = (1ULL << 32 ), // Is "int" token implicitly added?
1411
- fIsInline = (1ULL << 33 ), // Is this a inline type
1412
- fIsTemplate = (1ULL << 34 ),
1413
- fIsSimplifedScope = (1ULL << 35 ), // scope added when simplifying e.g. if (int i = ...; ...)
1414
- fIsRemovedVoidParameter = (1ULL << 36 ), // A void function parameter has been removed
1415
- fIsIncompleteConstant = (1ULL << 37 ),
1416
- fIsRestrict = (1ULL << 38 ), // Is this a restrict pointer type
1417
- fIsAtomic = (1ULL << 39 ), // Is this a _Atomic declaration
1418
- fIsSimplifiedTypedef = (1ULL << 40 ),
1419
- fIsFinalType = (1ULL << 41 ), // Is this a type with final specifier
1420
- fIsInitComma = (1ULL << 42 ), // Is this comma located inside some {..}. i.e: {1,2,3,4}
1421
- fIsInitBracket = (1ULL << 43 ), // Is this bracket used as a part of variable initialization i.e: int a{5}, b(2);
1403
+ fIsAttributeFallthrough = (1ULL << 19 ), // [[__fallthrough__]], [[fallthrough]]
1404
+ fIsControlFlowKeyword = (1ULL << 20 ), // if/switch/while/...
1405
+ fIsOperatorKeyword = (1ULL << 21 ), // operator=, etc
1406
+ fIsComplex = (1ULL << 22 ), // complex/_Complex type
1407
+ fIsEnumType = (1ULL << 23 ), // enumeration type
1408
+ fIsName = (1ULL << 24 ),
1409
+ fIsLiteral = (1ULL << 25 ),
1410
+ fIsTemplateArg = (1ULL << 26 ),
1411
+ fAtAddress = (1ULL << 27 ), // @ 0x4000
1412
+ fIncompleteVar = (1ULL << 28 ),
1413
+ fConstexpr = (1ULL << 29 ),
1414
+ fExternC = (1ULL << 30 ),
1415
+ fIsSplitVarDeclComma = (1ULL << 31 ), // set to true when variable declarations are split up ('int a,b;' => 'int a; int b;')
1416
+ fIsSplitVarDeclEq = (1ULL << 32 ), // set to true when variable declaration with initialization is split up ('int a=5;' => 'int a; a=5;')
1417
+ fIsImplicitInt = (1ULL << 33 ), // Is "int" token implicitly added?
1418
+ fIsInline = (1ULL << 34 ), // Is this a inline type
1419
+ fIsTemplate = (1ULL << 35 ),
1420
+ fIsSimplifedScope = (1ULL << 36 ), // scope added when simplifying e.g. if (int i = ...; ...)
1421
+ fIsRemovedVoidParameter = (1ULL << 37 ), // A void function parameter has been removed
1422
+ fIsIncompleteConstant = (1ULL << 38 ),
1423
+ fIsRestrict = (1ULL << 39 ), // Is this a restrict pointer type
1424
+ fIsAtomic = (1ULL << 40 ), // Is this a _Atomic declaration
1425
+ fIsSimplifiedTypedef = (1ULL << 41 ),
1426
+ fIsFinalType = (1ULL << 42 ), // Is this a type with final specifier
1427
+ fIsInitComma = (1ULL << 43 ), // Is this comma located inside some {..}. i.e: {1,2,3,4}
1428
+ fIsInitBracket = (1ULL << 44 ), // Is this bracket used as a part of variable initialization i.e: int a{5}, b(2);
1422
1429
};
1423
1430
1424
1431
enum : std::uint8_t {
0 commit comments