[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 15:47:44 PST 2024
================
@@ -8719,6 +8719,18 @@ Attribute used by `clspv`_ (OpenCL-C to Vulkan SPIR-V compiler) to identify func
}];
}
+def NoTrivialAutoVarInitDocs : Documentation {
+ let Category = DocCatDecl;
+ let Content = [{
+The ``__declspec(no_init_all)`` attribute disables the automatic initialization that the
+`-ftrivial-auto-var-init`_ flag would have applied to locals in a marked function, or instances of
+a marked type. Note that this attribute has no effect for locals that are automatically initialized
+without the `-ftrivial-auto-var-init`_ flag.
+
+.. _`-ftrivial-auto-var-init`: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-ftrivial-auto-var-init
----------------
efriedma-quic wrote:
Can you write something like the following?
```
:ref:`option:: -ftrivial-auto-var-init=<arg>`
```
Not a big deal, but ideally we want people to be able to publish documentation to places other than clang.llvm.org.
https://github.com/llvm/llvm-project/pull/116847
More information about the cfe-commits
mailing list