Remove unneeded ifdefs

This commit is contained in:
Devajith Valaparambil Sreeramaswamy 2024-04-23 17:55:39 +02:00 committed by jenkins
parent 517ba1c546
commit a943f62f14

View File

@ -918,24 +918,21 @@ namespace cling {
if (!ParseOrWrapTopLevelDecl()) if (!ParseOrWrapTopLevelDecl())
return kFailed; return kFailed;
#ifdef _WIN32 if (PP.getLangOpts().DelayedTemplateParsing) {
// Microsoft-specific: // Microsoft-specific:
// Late parsed templates can leave unswallowed "macro"-like tokens. // Late parsed templates can leave unswallowed "macro"-like tokens.
// They will seriously confuse the Parser when entering the next // They will seriously confuse the Parser when entering the next
// source file. So lex until we are EOF. // source file. So lex until we are EOF.
Token Tok; Token Tok;
Tok.setKind(tok::eof);
do { do {
PP.Lex(Tok); PP.Lex(Tok);
} while (Tok.isNot(tok::eof)); } while (Tok.isNot(tok::eof));
#endif }
#ifndef NDEBUG
Token AssertTok; Token AssertTok;
PP.Lex(AssertTok); PP.Lex(AssertTok);
assert(AssertTok.is(tok::eof) && assert(AssertTok.is(tok::eof) &&
"Lexer must be EOF when starting incremental parse!"); "Lexer must be EOF when starting incremental parse!");
#endif
DiagnosticsEngine& Diags = getCI()->getDiagnostics(); DiagnosticsEngine& Diags = getCI()->getDiagnostics();
if (m_Consumer->getTransaction()->getIssuedDiags() == Transaction::kErrors) if (m_Consumer->getTransaction()->getIssuedDiags() == Transaction::kErrors)