[clang] [clang][docs] Fix typos in option names (PR #163482)

KAWASHIMA Takahiro via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 14 17:54:09 PDT 2025


https://github.com/kawashima-fj created https://github.com/llvm/llvm-project/pull/163482

If you type option names in the currnet Clang Compiler User's Manual, you'll see:

```console
$ clang -fnobasic-block-address-map -fnounique-internal-linkage-names -f-split-lto-unit test.c 
clang: error: unknown argument '-fnobasic-block-address-map'; did you mean '-fno-basic-block-address-map'?
clang: error: unknown argument '-fnounique-internal-linkage-names'; did you mean '-fno-unique-internal-linkage-names'?
clang: error: unknown argument '-f-split-lto-unit'; did you mean '-fsplit-lto-unit'?
```


>From 956d5df787f072d012b8ba537e7266735a331cba Mon Sep 17 00:00:00 2001
From: KAWASHIMA Takahiro <t-kawashima at fujitsu.com>
Date: Wed, 15 Oct 2025 09:34:42 +0900
Subject: [PATCH] [clang][docs] Fix typos in option names

---
 clang/docs/UsersManual.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index 01f0b27846f0b..e82b16f24c73f 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -2325,7 +2325,7 @@ are listed below.
    devirtualization and virtual constant propagation, for classes with
    :doc:`hidden LTO visibility <LTOVisibility>`. Requires ``-flto``.
 
-.. option:: -f[no]split-lto-unit
+.. option:: -f[no-]split-lto-unit
 
    Controls splitting the :doc:`LTO unit <LTOVisibility>` into regular LTO and
    :doc:`ThinLTO` portions, when compiling with -flto=thin. Defaults to false
@@ -2518,7 +2518,7 @@ are listed below.
 
 .. _funique_internal_linkage_names:
 
-.. option:: -f[no]-unique-internal-linkage-names
+.. option:: -f[no-]unique-internal-linkage-names
 
    Controls whether Clang emits a unique (best-effort) symbol name for internal
    linkage symbols.  When this option is set, compiler hashes the main source
@@ -2539,7 +2539,7 @@ are listed below.
      $ cd $P/bar && clang -c -funique-internal-linkage-names name_conflict.c
      $ cd $P && clang foo/name_conflict.o && bar/name_conflict.o
 
-.. option:: -f[no]-basic-block-address-map:
+.. option:: -f[no-]basic-block-address-map:
   Emits a ``SHT_LLVM_BB_ADDR_MAP`` section which includes address offsets for each
   basic block in the program, relative to the parent function address.
 



More information about the cfe-commits mailing list