diff --git a/lib/astutils.cpp b/lib/astutils.cpp index 08a0a046cd1e..ab296d8e8277 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -2437,7 +2437,14 @@ static bool isArray(const Token* tok) return false; } -static bool isMutableExpression(const Token* tok) +static inline +// compiling with older GCC versions might fail with +// lib/astutils.cpp:2444:6: error: inlining failed in call to always_inline 'bool isMutableExpression(const Token*)': function not considered for inlining +// build/astutils.cpp:3591:6: error: inlining failed in call to ‘always_inline’ ‘bool isMutableExpression(const Token*)’: recursive inlining +#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 14) +__attribute__((always_inline)) +#endif +bool isMutableExpression(const Token* tok) { if (!tok) return false;