Handle empty token list better (for instance when Preprocessor::validateCfg() see problem)

This commit is contained in:
Daniel Marjamäki 2017-05-17 22:30:20 +02:00
parent 1f4b84379d
commit bc12a0b21f
1 changed files with 2 additions and 0 deletions

View File

@ -316,6 +316,8 @@ unsigned int CppCheck::processFile(const std::string& filename, const std::strin
const simplecpp::TokenList &tokensP = preprocessor.preprocess(tokens1, cfg, files);
_tokenizer.createTokens(&tokensP);
timer.Stop();
if (tokensP.empty())
continue;
// skip rest of iteration if just checking configuration
if (_settings.checkConfiguration)