Skip to content

Commit

Permalink
astutils.cpp: always inline isMutableExpression()
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Jul 30, 2024
1 parent 3edeccb commit 223cce3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/astutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 223cce3

Please sign in to comment.