[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-20 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello closed https://github.com/llvm/llvm-project/pull/116847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/116847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/116847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Daniel Paoliello via cfe-commits
@@ -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 i

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/116847 >From d14059d2d7cb529fc0315c2cb1fbe869ebaab58d Mon Sep 17 00:00:00 2001 From: "Daniel Paoliello (HE/HIM)" Date: Tue, 19 Nov 2024 09:34:51 -0800 Subject: [PATCH] [clang] Add support for __declspec(no_init_all)

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Eli Friedman via cfe-commits
@@ -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 i

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Daniel Paoliello via cfe-commits
dpaoliello wrote: > I'd still like to have a basic description in documentation for reference, > especially since there isn't any corresponding MSVC compiler documentation. Done https://github.com/llvm/llvm-project/pull/116847 ___ cfe-commits maili

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello edited https://github.com/llvm/llvm-project/pull/116847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/116847 >From d97c75c91d5b4a8b6c490ce125f3c7cf0f62b234 Mon Sep 17 00:00:00 2001 From: "Daniel Paoliello (HE/HIM)" Date: Tue, 19 Nov 2024 09:34:51 -0800 Subject: [PATCH] [clang] Add support for __declspec(no_init_all)

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/116847 >From bacaeb4e7a0653cee26698f47a63fa549ef7a8ce Mon Sep 17 00:00:00 2001 From: "Daniel Paoliello (HE/HIM)" Date: Tue, 19 Nov 2024 09:34:51 -0800 Subject: [PATCH] [clang] Add support for __declspec(no_init_all)

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If we're going to treat `/d1initall` as an alias for `-ftrivial-auto-var-init`, can we just treat `__declspec(no_init_all)` as an alias for `__attribute__((uninitialized))`? https://github.com/llvm/llvm-project/pull/116847 ___ cf

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I see. I agree we don't need to add non-__declspec syntax here. We're adding this for MSVC compat, so we need to match MSVC semantics anyway, so there's not really any other way to implement this. We can always adjust the code later if we end up implementing an overlapp

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Daniel Paoliello via cfe-commits
dpaoliello wrote: > If we're going to treat `/d1initall` as an alias for > `-ftrivial-auto-var-init`, can we just treat `__declspec(no_init_all)` as an > alias for `__attribute__((uninitialized))`? `uninitialized` currently only applied to local variable declarations, whereas `__declspec(no_i

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Paoliello (dpaoliello) Changes In MSVC, when `/d1initall` is enabled, `__declspec(no_init_all)` can be applied to a type to suppress auto-initialization for all instances of that type or to a function to suppress auto-initializatio

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Daniel Paoliello (dpaoliello) Changes In MSVC, when `/d1initall` is enabled, `__declspec(no_init_all)` can be applied to a type to suppress auto-initialization for all instances of that type or to a function to suppress auto-initi

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-19 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello created https://github.com/llvm/llvm-project/pull/116847 In MSVC, when `/d1initall` is enabled, `__declspec(no_init_all)` can be applied to a type to suppress auto-initialization for all instances of that type or to a function to suppress auto-initialization for a