[clang] [clang] Expose -fdiagnostics-show-inlining-chain to clang-cl (PR #192241)
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 15 04:35:17 PDT 2026
https://github.com/nico created https://github.com/llvm/llvm-project/pull/192241
None
>From 4ac5017430ef3fc30c217db98ef4baa05ab27c0d Mon Sep 17 00:00:00 2001
From: Nico Weber <thakis at chromium.org>
Date: Wed, 15 Apr 2026 07:34:07 -0400
Subject: [PATCH] [clang] Expose -fdiagnostics-show-inlining-chain to clang-cl
Add CLOption visibility so that clang-cl accepts
-fdiagnostics-show-inlining-chain and -fno-diagnostics-show-inlining-chain.
---
clang/include/clang/Options/Options.td | 4 ++--
clang/test/Driver/cl-options.c | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/clang/include/clang/Options/Options.td b/clang/include/clang/Options/Options.td
index 96ecc8fbdeb83..5673fb0c47d5b 100644
--- a/clang/include/clang/Options/Options.td
+++ b/clang/include/clang/Options/Options.td
@@ -2239,10 +2239,10 @@ defm diagnostics_show_note_include_stack : BoolFOption<"diagnostics-show-note-in
defm diagnostics_show_inlining_chain
: BoolFOption<"diagnostics-show-inlining-chain",
CodeGenOpts<"ShowInliningChain">, DefaultFalse,
- PosFlag<SetTrue, [], [ClangOption, CC1Option],
+ PosFlag<SetTrue, [], [ClangOption, CLOption, CC1Option],
"Show inlining chain notes for "
"[[gnu::warning/error]] diagnostics">,
- NegFlag<SetFalse, [], [ClangOption, CC1Option]>>;
+ NegFlag<SetFalse, [], [ClangOption, CLOption, CC1Option]>>;
def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>;
def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>;
def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">,
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index b77a6cd6eb21f..919a926cd7e66 100644
--- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c
@@ -716,6 +716,8 @@
// RUN: -ffile-compilation-dir=. \
// RUN: -fdiagnostics-parseable-fixits \
// RUN: -fdiagnostics-absolute-paths \
+// RUN: -fdiagnostics-show-inlining-chain \
+// RUN: -fno-diagnostics-show-inlining-chain \
// RUN: -ferror-limit=10 \
// RUN: -fident \
// RUN: -fno-ident \
More information about the cfe-commits
mailing list