@@ -657,27 +657,28 @@ class CPPCHECKLIB Variable {
657657class CPPCHECKLIB Function {
658658 /* * @brief flags mask used to access specific bit. */
659659 enum {
660- fHasBody = (1 << 0 ), // /< @brief has implementation
661- fIsInline = (1 << 1 ), // /< @brief implementation in class definition
662- fIsConst = (1 << 2 ), // /< @brief is const
663- fIsVirtual = (1 << 3 ), // /< @brief is virtual
664- fIsPure = (1 << 4 ), // /< @brief is pure virtual
665- fIsStatic = (1 << 5 ), // /< @brief is static
666- fIsStaticLocal = (1 << 6 ), // /< @brief is static local
667- fIsExtern = (1 << 7 ), // /< @brief is extern
668- fIsFriend = (1 << 8 ), // /< @brief is friend
669- fIsExplicit = (1 << 9 ), // /< @brief is explicit
670- fIsDefault = (1 << 10 ), // /< @brief is default
671- fIsDelete = (1 << 11 ), // /< @brief is delete
672- fHasOverrideSpecifier = (1 << 12 ), // /< @brief does declaration contain 'override' specifier?
673- fHasFinalSpecifier = (1 << 13 ), // /< @brief does declaration contain 'final' specifier?
674- fIsNoExcept = (1 << 14 ), // /< @brief is noexcept
675- fIsThrow = (1 << 15 ), // /< @brief is throw
676- fIsOperator = (1 << 16 ), // /< @brief is operator
677- fHasLvalRefQual = (1 << 17 ), // /< @brief has & lvalue ref-qualifier
678- fHasRvalRefQual = (1 << 18 ), // /< @brief has && rvalue ref-qualifier
679- fIsVariadic = (1 << 19 ), // /< @brief is variadic
680- fIsVolatile = (1 << 20 ) // /< @brief is volatile
660+ fHasBody = (1 << 0 ), // /< @brief has implementation
661+ fIsInline = (1 << 1 ), // /< @brief implementation in class definition
662+ fIsConst = (1 << 2 ), // /< @brief is const
663+ fIsVirtual = (1 << 3 ), // /< @brief is virtual
664+ fIsPure = (1 << 4 ), // /< @brief is pure virtual
665+ fIsStatic = (1 << 5 ), // /< @brief is static
666+ fIsStaticLocal = (1 << 6 ), // /< @brief is static local
667+ fIsExtern = (1 << 7 ), // /< @brief is extern
668+ fIsFriend = (1 << 8 ), // /< @brief is friend
669+ fIsExplicit = (1 << 9 ), // /< @brief is explicit
670+ fIsDefault = (1 << 10 ), // /< @brief is default
671+ fIsDelete = (1 << 11 ), // /< @brief is delete
672+ fHasOverrideSpecifier = (1 << 12 ), // /< @brief does declaration contain 'override' specifier?
673+ fHasFinalSpecifier = (1 << 13 ), // /< @brief does declaration contain 'final' specifier?
674+ fIsNoExcept = (1 << 14 ), // /< @brief is noexcept
675+ fIsThrow = (1 << 15 ), // /< @brief is throw
676+ fIsOperator = (1 << 16 ), // /< @brief is operator
677+ fHasLvalRefQual = (1 << 17 ), // /< @brief has & lvalue ref-qualifier
678+ fHasRvalRefQual = (1 << 18 ), // /< @brief has && rvalue ref-qualifier
679+ fIsVariadic = (1 << 19 ), // /< @brief is variadic
680+ fIsVolatile = (1 << 20 ), // /< @brief is volatile
681+ fHasTrailingReturnType = (1 << 21 ), // /< @brief has trailing return type
681682 };
682683
683684 /* *
@@ -819,6 +820,9 @@ class CPPCHECKLIB Function {
819820 bool isVolatile () const {
820821 return getFlag (fIsVolatile );
821822 }
823+ bool hasTrailingReturnType () const {
824+ return getFlag (fHasTrailingReturnType );
825+ }
822826
823827 void hasBody (bool state) {
824828 setFlag (fHasBody , state);
@@ -907,6 +911,9 @@ class CPPCHECKLIB Function {
907911 void isVolatile (bool state) {
908912 setFlag (fIsVolatile , state);
909913 }
914+ void hasTrailingReturnType (bool state) {
915+ return setFlag (fHasTrailingReturnType , state);
916+ }
910917};
911918
912919class CPPCHECKLIB Scope {
0 commit comments