[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)
Daniel Paoliello via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 16:15:03 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
----------------
dpaoliello wrote:
I've made the link relative, but I have no idea how to get the `:ref:` syntax to work.
In theory it's a link to an option: <https://www.sphinx-doc.org/en/master/usage/referencing.html#role-option>, but it's also cross-doc, so ``:option:`-ftrivial-auto-var-init <ClangCommandLineReference:-ftrivial-auto-var-init=<arg>>` `` should work, but it didn't seem to.
https://github.com/llvm/llvm-project/pull/116847
More information about the cfe-commits
mailing list