Skip to content

Commit

Permalink
Only check DiagnosticsEngine::hasErrorOccurred, hasFatalErrorOccurred…
Browse files Browse the repository at this point in the history
… cannot be true without it.
  • Loading branch information
marsupial authored and sftnight committed Feb 17, 2017
1 parent de62978 commit 097a4e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Interpreter/IncrementalParser.cpp
Expand Up @@ -371,8 +371,11 @@ namespace cling {
//TODO: Make the enum orable.
EParseResult ParseResult = kSuccess;

if (Diags.hasErrorOccurred() || Diags.hasFatalErrorOccurred()
|| T->getIssuedDiags() == Transaction::kErrors) {
assert((Diags.hasFatalErrorOccurred() ? Diags.hasErrorOccurred() : true)
&& "Diags.hasFatalErrorOccurred without Diags.hasErrorOccurred !");

if (Diags.hasErrorOccurred() || T->getIssuedDiags() == Transaction::kErrors)
{
T->setIssuedDiags(Transaction::kErrors);
ParseResult = kFailed;
} else if (Diags.getNumWarnings() > 0) {
Expand Down

0 comments on commit 097a4e3

Please sign in to comment.