[all-commits] [llvm/llvm-project] a90724: [Clang][Docs][NFC] Correct documentation for the C...

Tom Honermann via All-commits all-commits at lists.llvm.org
Thu Mar 6 10:01:51 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a907246fb29bd74dc025beb87a2ef1858a8d0dae
      https://github.com/llvm/llvm-project/commit/a907246fb29bd74dc025beb87a2ef1858a8d0dae
  Author: Tom Honermann <tom.honermann at intel.com>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M clang/docs/CommandGuide/clang.rst

  Log Message:
  -----------
  [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (#129113)

Clang's prior documentation for the `CPATH` environment variable stated that
paths it specifies are added as system header search paths. The actual behavior
is that such paths are treated as though they were passed via `-I` options at
the end of the driver command line and are thus added as non-system (user)
header search paths.

The documentation additionally claimed that empty path entries in the `CPATH`
environment variable are ignored. This was also incorrect; Clang treats empty
entries as nominating the compiler's current working directory; as though `.`
was specified.

Clang's behavior is consistent with gcc as documented at
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html#index-CPATH.

This change aligns Clang's documentation with the behavior actually observed.
Additional editorial changes are included to clarify that the related
`C_INCLUDE_PATH`, `CPLUS_INCLUDE_PATH`, `OBJC_INCLUDE_PATH`, and
`OBJCPLUS_INCLUDE_PATH` environment variables specify additional paths that
are treated as system header search paths (in contrast to `CPATH`).

Fixes issue #49742.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list