Revert "Use 'Stringification => Tokenizer' until some issues have been fixed"
This reverts commit c2727691a4
.
This commit is contained in:
parent
040d2f0012
commit
340c687cbf
|
@ -284,13 +284,11 @@ unsigned int CppCheck::processFile(const std::string& filename, const std::strin
|
||||||
cfg = _settings.userDefines + cfg;
|
cfg = _settings.userDefines + cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string codeWithoutCfg;
|
|
||||||
{
|
|
||||||
Timer t("Preprocessor::getcode", _settings.showtime, &S_timerResults);
|
|
||||||
codeWithoutCfg = preprocessor.getcode(tokens1, cfg, files, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_settings.preprocessOnly) {
|
if (_settings.preprocessOnly) {
|
||||||
|
Timer t("Preprocessor::getcode", _settings.showtime, &S_timerResults);
|
||||||
|
std::string codeWithoutCfg = preprocessor.getcode(tokens1, cfg, files, true);
|
||||||
|
t.Stop();
|
||||||
|
|
||||||
if (codeWithoutCfg.compare(0,5,"#file") == 0)
|
if (codeWithoutCfg.compare(0,5,"#file") == 0)
|
||||||
codeWithoutCfg.insert(0U, "//");
|
codeWithoutCfg.insert(0U, "//");
|
||||||
std::string::size_type pos = 0;
|
std::string::size_type pos = 0;
|
||||||
|
@ -314,11 +312,11 @@ unsigned int CppCheck::processFile(const std::string& filename, const std::strin
|
||||||
bool result;
|
bool result;
|
||||||
|
|
||||||
// Create tokens, skip rest of iteration if failed
|
// Create tokens, skip rest of iteration if failed
|
||||||
std::istringstream istr(codeWithoutCfg);
|
|
||||||
Timer timer("Tokenizer::createTokens", _settings.showtime, &S_timerResults);
|
Timer timer("Tokenizer::createTokens", _settings.showtime, &S_timerResults);
|
||||||
result = _tokenizer.createTokens(istr, filename);
|
const simplecpp::TokenList &tokensP = preprocessor.preprocess(tokens1, cfg, files);
|
||||||
|
_tokenizer.createTokens(&tokensP);
|
||||||
timer.Stop();
|
timer.Stop();
|
||||||
if (!result)
|
if (tokensP.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// skip rest of iteration if just checking configuration
|
// skip rest of iteration if just checking configuration
|
||||||
|
|
Loading…
Reference in New Issue