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

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 16 10:58:23 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Nico Weber (nico)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/192500.diff


2 Files Affected:

- (modified) clang/include/clang/Options/Options.td (+1-1) 
- (modified) clang/test/Driver/cl-options.c (+1) 


``````````diff
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 \

``````````

</details>


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


More information about the cfe-commits mailing list