Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rs_bindings_from_cc/recording_diagnostic_consumer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ std::string RecordingDiagnosticConsumer::ConcatenatedDiagnostics(
RecordingDiagnosticConsumer RecordDiagnostics(
clang::DiagnosticsEngine& diagnostic_engine,
std::function<void(void)> callback) {
// Reset the diagnostic engine to a known state. In particular, if there were
// too many diagnostics reported previously (even in sfinae contexts),
// the diagnostic engine's fatal bit will get stuck on.
diagnostic_engine.Reset(/*soft=*/true);
RecordingDiagnosticConsumer diagnostic_recorder;
std::unique_ptr<clang::DiagnosticConsumer> original_consumer =
diagnostic_engine.takeClient();
Expand Down
Loading