================
@@ -349,7 +349,13 @@ Interpreter::Interpreter(std::unique_ptr<CompilerInstance> 
Instance,
   if (ErrOut)
     return;
 
-  CI->ExecuteAction(*Act);
+  if (!CI->ExecuteAction(*Act) || CI->getDiagnostics().hasErrorOccurred()) {
----------------
jeaye wrote:

Wouldn't introducing a new function be *more* code, overall, given it's only 
used twice? I tend to follow the rule of three: 
https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)

https://github.com/llvm/llvm-project/pull/217147
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to