================
@@ -1,35 +1,33 @@
-.. title:: clang-tidy - llvmlibc-restrict-system-libc-headers
+```{title} clang-tidy - llvmlibc-restrict-system-libc-headers
+```
-llvmlibc-restrict-system-libc-headers
-=====================================
+# llvmlibc-restrict-system-libc-headers
Finds includes of system libc headers not provided by the compiler within
llvm-libc implementations.
-.. code-block:: c++
-
- #include <stdio.h> // Not allowed because it is part of system
libc.
- #include <stddef.h> // Allowed because it is provided by the
compiler.
- #include "internal/stdio.h" // Allowed because it is NOT part of system
libc.
-
+```c++
+#include <stdio.h> // Not allowed because it is part of system libc.
+#include <stddef.h> // Allowed because it is provided by the
compiler.
+#include "internal/stdio.h" // Allowed because it is NOT part of system libc.
+```
This check is necessary because accidentally including system libc headers can
lead to subtle and hard to detect bugs. For example consider a system libc
-whose ``dirent`` struct has slightly different field ordering than llvm-libc.
+whose `dirent` struct has slightly different field ordering than llvm-libc.
While this will compile successfully, this can cause issues during runtime
because they are ABI incompatible.
-Options
--------
-
-.. option:: Includes
+## Options
- A string containing a comma separated glob list of allowed include
- filenames. Similar to the -checks glob list for running clang-tidy itself,
- the two wildcard characters are `*` and `-`, to include and exclude globs,
- respectively. The default is `-*`, which disallows all includes.
+:::{option} Includes
----------------
s4chinjha wrote:
yes, i've update with "```{option}" here
https://github.com/llvm/llvm-project/pull/234571
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits