[clang] [Clang][Docs] Discontinue documenting the GCC -I- and --include-barrier options. (PR #184941)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 5 19:06:22 PST 2026
https://github.com/tahonermann created https://github.com/llvm/llvm-project/pull/184941
Clang has never implemented the GCC `-I-` and `--include-barrier` options. An error is issued if they are used. GCC deprecated these options in GCC 4. Advertising their availability in documentation and help text is misleading.
>From 5b44b67fd877003581dd0b21e8421367b16ae45a Mon Sep 17 00:00:00 2001
From: Tom Honermann <tom.honermann at intel.com>
Date: Thu, 5 Mar 2026 18:48:45 -0800
Subject: [PATCH] [Clang][Docs] Discontinue documenting the GCC -I- and
--include-barrier options.
Clang has never implemented the GCC -I- and --include-barrier options.
An error is issued if they are used. GCC deprecated these options in
GCC 4. Advertising their availability in documentation and help text
is misleading.
---
clang/include/clang/Options/Options.td | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/include/clang/Options/Options.td b/clang/include/clang/Options/Options.td
index fe7169423b6bf..c71df8e9bdc3b 100644
--- a/clang/include/clang/Options/Options.td
+++ b/clang/include/clang/Options/Options.td
@@ -62,7 +62,7 @@ def LinkOption : OptionFlag;
// target will lead to an err_drv_unsupported_opt_for_target error.
def TargetSpecific : OptionFlag;
-// Indicates that this warning is ignored, but accepted with a warning for
+// Indicates that this option is ignored, but accepted with a warning for
// GCC compatibility.
class IgnoredGCCCompat : Flags<[HelpHidden]> {}
@@ -784,7 +784,7 @@ def fshow_skipped_includes : Flag<["-"], "fshow-skipped-includes">,
or #pragma once. This flag makes -H show also such includes.}]>,
MarshallingInfoFlag<DependencyOutputOpts<"ShowSkippedHeaderIncludes">>;
-def I_ : Flag<["-"], "I-">, Group<I_Group>,
+def I_ : Flag<["-"], "I-">, Group<I_Group>, IgnoredGCCCompat,
HelpText<"Restrict all prior -I flags to double-quoted inclusion and "
"remove current directory from include path">;
def I : JoinedOrSeparate<["-"], "I">, Group<I_Group>,
More information about the cfe-commits
mailing list