Tokenizer: remove the keyword 'inline'
This commit is contained in:
parent
d17d199415
commit
e1efad0c27
|
@ -992,14 +992,14 @@ bool Tokenizer::tokenize(std::istream &code, const char FileName[], const std::s
|
||||||
Token::createMutualLinks(tok->tokAt(2), tok->tokAt(3));
|
Token::createMutualLinks(tok->tokAt(2), tok->tokAt(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove "volatile" and "mutable"
|
// Remove "volatile", "mutable" and "inline"
|
||||||
while (_tokens && (_tokens->str() == "volatile" || _tokens->str() == "mutable"))
|
while (Token::Match(_tokens, "volatile|mutable|inline"))
|
||||||
{
|
{
|
||||||
_tokens->deleteThis();
|
_tokens->deleteThis();
|
||||||
}
|
}
|
||||||
for (Token *tok = _tokens; tok; tok = tok->next())
|
for (Token *tok = _tokens; tok; tok = tok->next())
|
||||||
{
|
{
|
||||||
while (tok->next() && (tok->next()->str() == "volatile" || tok->next()->str() == "mutable"))
|
while (Token::Match(tok->next(), "volatile|mutable|inline"))
|
||||||
{
|
{
|
||||||
tok->deleteNext();
|
tok->deleteNext();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2373,7 +2373,7 @@ private:
|
||||||
const char expected[] =
|
const char expected[] =
|
||||||
"namespace VL { "
|
"namespace VL { "
|
||||||
"; "
|
"; "
|
||||||
"inline float fast_atan2 ( float y , float x ) { } "
|
"float fast_atan2 ( float y , float x ) { } "
|
||||||
"}";
|
"}";
|
||||||
|
|
||||||
ASSERT_EQUALS(expected, tok(code, false));
|
ASSERT_EQUALS(expected, tok(code, false));
|
||||||
|
|
Loading…
Reference in New Issue