[flang-commits] [clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

Tarun Prabhu via flang-commits flang-commits at lists.llvm.org
Tue Feb 18 08:12:26 PST 2025


================
@@ -957,6 +957,32 @@ static bool parseDialectArgs(CompilerInvocation &res, llvm::opt::ArgList &args,
                              clang::DiagnosticsEngine &diags) {
   unsigned numErrorsBefore = diags.getNumErrors();
 
+  // -fd-lines-as-code
+  if (args.hasArg(clang::driver::options::OPT_fd_lines_as_code)) {
+    if (res.getFrontendOpts().fortranForm == FortranForm::FreeForm) {
+      const auto fdLinesAsWarning = diags.getCustomDiagID(
----------------
tarunprabhu wrote:

Can we use a more concrete type here instead of `auto`?

https://github.com/llvm/llvm-project/pull/127605


More information about the flang-commits mailing list