Skip to content

Commit 828e81b

Browse files
authored
Don't suppress errors in the original src.cpp file (#79)
1 parent 7cfa0e0 commit 828e81b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cpp2rust/cpp_rule_preprocessor.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,9 @@ class ActionFactory : public clang::tooling::FrontendActionFactory {
698698

699699
void HandleTranslationUnit(clang::ASTContext &ctx) override {
700700
auto &DE = CI_->getDiagnostics();
701+
if (DE.hasErrorOccurred()) {
702+
std::exit(EXIT_FAILURE);
703+
}
701704
DE.setSuppressAllDiagnostics(true);
702705
DE.setClient(new clang::IgnoringDiagConsumer(), true);
703706
CB_->init(CI_->getSema());

0 commit comments

Comments
 (0)