[llvm] [opt] Do not exit on first emitError (PR #194858)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 06:31:52 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/lib/Analysis/IR2Vec.cpp llvm/lib/Transforms/IPO/Inliner.cpp llvm/tools/opt/NewPMDriver.cpp llvm/tools/opt/NewPMDriver.h llvm/tools/opt/optdriver.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/tools/opt/NewPMDriver.cpp b/llvm/tools/opt/NewPMDriver.cpp
index 9b861c48a..569426a7f 100644
--- a/llvm/tools/opt/NewPMDriver.cpp
+++ b/llvm/tools/opt/NewPMDriver.cpp
@@ -246,8 +246,7 @@ bool OptDiagnosticHandler::handleDiagnostics(const DiagnosticInfo &DI) {
// optimization remarks are gated by the -pass-remarks* flags (isEnabled),
// and verbose remarks additionally require hotness data.
if (auto *Remark = dyn_cast<DiagnosticInfoOptimizationBase>(&DI))
- if (!Remark->isEnabled() ||
- (Remark->isVerbose() && !Remark->getHotness()))
+ if (!Remark->isEnabled() || (Remark->isVerbose() && !Remark->getHotness()))
return true;
DiagnosticPrinterRawOStream DP(errs());
``````````
</details>
https://github.com/llvm/llvm-project/pull/194858
More information about the llvm-commits
mailing list