[clang] [clang] Exposse -fdiagnostics-print-source-range-info to clang-cl (PR #192500)

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 16 10:57:47 PDT 2026


https://github.com/nico created https://github.com/llvm/llvm-project/pull/192500

None

>From 85d217ce25f58ca0b3d963ff8bcb7826d6e68e9c Mon Sep 17 00:00:00 2001
From: Nico Weber <thakis at chromium.org>
Date: Thu, 16 Apr 2026 13:57:15 -0400
Subject: [PATCH] [clang] Exposse -fdiagnostics-print-source-range-info to
 clang-cl

---
 clang/include/clang/Options/Options.td | 2 +-
 clang/test/Driver/cl-options.c         | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/include/clang/Options/Options.td b/clang/include/clang/Options/Options.td
index 5673fb0c47d5b..cbdf0e7cf3e62 100644
--- a/clang/include/clang/Options/Options.td
+++ b/clang/include/clang/Options/Options.td
@@ -2211,7 +2211,7 @@ def fdiagnostics_parseable_fixits : Flag<["-"], "fdiagnostics-parseable-fixits">
     HelpText<"Print fix-its in machine parseable form">,
     MarshallingInfoFlag<DiagnosticOpts<"ShowParseableFixits">>;
 def fdiagnostics_print_source_range_info : Flag<["-"], "fdiagnostics-print-source-range-info">,
-    Group<f_clang_Group>,  Visibility<[ClangOption, CC1Option]>,
+    Group<f_clang_Group>,  Visibility<[ClangOption, CLOption, CC1Option]>,
     HelpText<"Print source range spans in numeric form">,
     MarshallingInfoFlag<DiagnosticOpts<"ShowSourceRanges">>;
 defm diagnostics_show_hotness : BoolFOption<"diagnostics-show-hotness",
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index 919a926cd7e66..37f8081e6be4f 100644
--- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c
@@ -715,6 +715,7 @@
 // RUN:     -fdebug-compilation-dir=. \
 // RUN:     -ffile-compilation-dir=. \
 // RUN:     -fdiagnostics-parseable-fixits \
+// RUN:     -fdiagnostics-print-source-range-info \
 // RUN:     -fdiagnostics-absolute-paths \
 // RUN:     -fdiagnostics-show-inlining-chain \
 // RUN:     -fno-diagnostics-show-inlining-chain \



More information about the cfe-commits mailing list