Skip to content

[clang][docs] Update Include Options Help #101192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

lenary
Copy link
Member

@lenary lenary commented Jul 30, 2024

This adds HelpTexts for some clang options that relate to include directory handling, to sync them up with what's in clang.rst (and therefore the man page).

@lenary lenary added documentation clang Clang issues not falling into any other category labels Jul 30, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 30, 2024

@llvm/pr-subscribers-clang

Author: Sam Elliott (lenary)

Changes

This adds HelpTexts for some clang options that relate to include directory handling, to sync them up with what's in clang.rst (and therefore the man page).


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

2 Files Affected:

  • (modified) clang/docs/CommandGuide/clang.rst (+4)
  • (modified) clang/include/clang/Driver/Options.td (+5-3)
diff --git a/clang/docs/CommandGuide/clang.rst b/clang/docs/CommandGuide/clang.rst
index 663aca1f6ddcb..9806c534dca34 100644
--- a/clang/docs/CommandGuide/clang.rst
+++ b/clang/docs/CommandGuide/clang.rst
@@ -699,6 +699,10 @@ Preprocessor Options
 
   Do not search clang's builtin directory for include files.
 
+.. option:: -nostdinc++
+
+  Do not search the system C++ standard library directory for include files.
+
 .. option:: -fkeep-system-includes
 
   Usable only with :option:`-E`. Do not copy the preprocessed content of
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index c8c56dbb51b28..83121d3e45b0d 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -5502,7 +5502,7 @@ def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_te
 def nobuiltininc : Flag<["-"], "nobuiltininc">,
   Visibility<[ClangOption, CC1Option, CLOption, DXCOption]>,
   Group<IncludePath_Group>,
-  HelpText<"Disable builtin #include directories">,
+  HelpText<"Disable builtin #include directories only">,
   MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseBuiltinIncludes">>;
 def nogpuinc : Flag<["-"], "nogpuinc">, Group<IncludePath_Group>,
   HelpText<"Do not add include paths for CUDA/HIP and"
@@ -5529,8 +5529,10 @@ def noprofilelib : Flag<["-"], "noprofilelib">;
 def noseglinkedit : Flag<["-"], "noseglinkedit">;
 def nostartfiles : Flag<["-"], "nostartfiles">, Group<Link_Group>;
 def nostdinc : Flag<["-"], "nostdinc">,
-  Visibility<[ClangOption, CLOption, DXCOption]>, Group<IncludePath_Group>;
-def nostdlibinc : Flag<["-"], "nostdlibinc">, Group<IncludePath_Group>;
+  Visibility<[ClangOption, CLOption, DXCOption]>, Group<IncludePath_Group>,
+  HelpText<"Disable both standard system #include directories and builtin #include directores">;
+def nostdlibinc : Flag<["-"], "nostdlibinc">, Group<IncludePath_Group>,
+  HelpText<"Disable standard system #include directories only">;
 def nostdincxx : Flag<["-"], "nostdinc++">, Visibility<[ClangOption, CC1Option]>,
   Group<IncludePath_Group>,
   HelpText<"Disable standard #include directories for the C++ standard library">,

lenary added 2 commits August 7, 2024 15:49
This adds HelpTexts for some clang options that relate to include
directory handling, to sync them up with what's in clang.rst (and
therefore the man page).
@lenary lenary force-pushed the clang/nostdlibcinc-docs branch from 1f7dc04 to f883903 Compare August 7, 2024 14:49
@lenary lenary merged commit 07ddf19 into llvm:main Aug 7, 2024
8 checks passed
@lenary lenary deleted the clang/nostdlibcinc-docs branch September 3, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants