diff --git a/tokenize.cpp b/tokenize.cpp index ae5b3bca8..294ddab26 100644 --- a/tokenize.cpp +++ b/tokenize.cpp @@ -596,6 +596,21 @@ void Tokenizer::tokenizeCode(std::istream &code, const unsigned int FileIndex) break; } } + } + + // Remove "volatile" + while ( TOKEN::Match(_tokens, "volatile") ) + { + TOKEN *tok = _tokens; + _tokens = _tokens->next; + delete tok; + } + for ( TOKEN *tok = _tokens; tok; tok = tok->next ) + { + while ( TOKEN::Match(tok->next, "volatile") ) + { + tok->deleteNext(); + } } } @@ -1112,7 +1127,7 @@ void Tokenizer::fillFunctionList() else if ( tok2->str() == ")" ) { - if ( TOKEN::Match(tok2, ") const|volatile| {") ) + if ( TOKEN::Match(tok2, ") const| {") ) { _functionList.push_back( tok ); tok = tok2;