[PATCH] D156320: [Flang][Driver] Add support for Rpass and related options

victorkingi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 9 10:24:32 PDT 2023


victorkingi marked an inline comment as done.
victorkingi added inline comments.


================
Comment at: flang/lib/Frontend/CompilerInvocation.cpp:786
       parseShowColorsArgs(args, /*defaultDiagColor=*/false);
+  res.getDiagnosticOpts().ShowColors = res.getFrontendOpts().showColors;
 
----------------
Apparently without forwarding the color option to the CompilerInvocation, flang doesn't print remark errors with color. Hence the need for this.
Also, a question, why do we have 2 instances of DiagnosticsEngine, one in CompilerInvocation and the other passed as an argument?


================
Comment at: flang/test/Driver/optimization-remark.f90:17-18
+
+! Check error on bad regex
+! RUN: not %flang %s -O1 -Rpass=[ 2>&1 | FileCheck %s --check-prefix=CHECK-REMARKS-ERROR
+
----------------
Testing error produced given a bad regex


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156320/new/

https://reviews.llvm.org/D156320



More information about the cfe-commits mailing list