[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 28 13:02:21 PST 2025
================
@@ -733,16 +733,17 @@ ENVIRONMENT
.. envvar:: CPATH
- If this environment variable is present, it is treated as a delimited list of
- paths to be added to the default system include path list. The delimiter is
- the platform dependent delimiter, as used in the PATH environment variable.
-
- Empty components in the environment variable are ignored.
+ This environment variable specifies additional header file search paths which
+ behave as if they were specified with the :option:`-I\<directory\>` option at
+ the end of the driver command line. Paths are delimited by the platform
+ dependent delimiter as used in the ``PATH`` environment variable. Empty
+ components in the environment variable are ignored.
----------------
tahonermann wrote:
I also found that wording a little awkward, but I wasn't able to come up with anything better. We could say something like "empty entries in the delimited path list are ignored". Is that an improvement? I dunno.
Separately, and interestingly, gcc treats such empty components/entries as if "." were specified. I find that horrifying and am glad that clang doesn't emulate that behavior! We could document this deviation from gcc behavior though.
https://github.com/llvm/llvm-project/pull/129113
More information about the cfe-commits
mailing list