[clang] [Clang][Docs] Discontinue documenting the GCC -I- and --include-barrier options. (PR #184941)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 19:06:55 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Tom Honermann (tahonermann)

<details>
<summary>Changes</summary>

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.

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


1 Files Affected:

- (modified) clang/include/clang/Options/Options.td (+2-2) 


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

``````````

</details>


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


More information about the cfe-commits mailing list