File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,8 @@ CreateFrontendAction(CompilerInstance &CI) {
210210}
211211
212212bool ExecuteCompilerInvocation (CompilerInstance *Clang) {
213+ unsigned NumErrorsBefore = Clang->getDiagnostics ().getNumErrors ();
214+
213215 // Honor -help.
214216 if (Clang->getFrontendOpts ().ShowHelp ) {
215217 driver::getDriverOptTable ().printHelp (
@@ -293,7 +295,7 @@ bool ExecuteCompilerInvocation(CompilerInstance *Clang) {
293295#endif
294296
295297 // If there were errors in processing arguments, don't do anything else.
296- if (Clang->getDiagnostics ().hasErrorOccurred () )
298+ if (Clang->getDiagnostics ().getNumErrors () != NumErrorsBefore )
297299 return false ;
298300 // Create and execute the frontend action.
299301 std::unique_ptr<FrontendAction> Act (CreateFrontendAction (*Clang));
You can’t perform that action at this time.
0 commit comments