diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index b64962752..992e2f51d 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -3018,7 +3018,7 @@ void Tokenizer::simplifyExternC() tok->linkAt(2)->deleteThis(); // } tok->deleteNext(2); // "C" { } else { - while ((tok2 = tok2->next()) && !Token::simpleMatch(tok2, ";")) + while ((tok2 = tok2->next()) && !Token::Match(tok2, "[;{]")) tok2->isExternC(true); tok->deleteNext(); // "C" } @@ -5247,6 +5247,8 @@ void Tokenizer::dump(std::ostream &out) const else if (tok->tokType() == Token::eLogicalOp) out << " isLogicalOp=\"true\""; } + if (tok->isExternC()) + out << " externLang=\"C\""; if (tok->isExpandedMacro()) out << " isExpandedMacro=\"true\""; if (tok->isRemovedVoidParameter())