Implement soft reset of the diagnostics engine.
authorTapasweni Pathak <tapaswenipathak@gmail.com>
Fri, 24 Jun 2022 11:11:20 +0000 (11:11 +0000)
committerVassil Vassilev <v.g.vassilev@gmail.com>
Fri, 24 Jun 2022 14:46:54 +0000 (14:46 +0000)
commit946c45a4ed5d5e2f262110a27390369f0d8fc3eb
treef57080bf72f213d76274a11c583781fb2d3199ee
parent8c278a27811ccf9d7a32c0a460b08069c4b3b7b5
Implement soft reset of the diagnostics engine.

This patch implements soft reset and adds tests for soft reset success of the
diagnostics engine. This allows us to recover from errors in clang-repl without
resetting the pragma handlers' state.

Differential revision: https://reviews.llvm.org/D126183
clang/include/clang/Basic/Diagnostic.h
clang/lib/Basic/Diagnostic.cpp
clang/lib/Interpreter/IncrementalParser.cpp
clang/tools/clang-repl/ClangRepl.cpp
clang/unittests/Basic/DiagnosticTest.cpp