[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-05-04 Thread Martin Uecker via cfe-commits
uecker wrote: So one usability issue I noticed that we also had in GCC is that the warning about declaring structs in function prototypes (-Wvisibility) does not make sense anymore and becomes annoying. We turned it off in C23 for complete (but not for incomplete) structs) without tag. http

[clang] [clang][ptrauth] add support for options parameter to __ptrauth (PR #136828)

2025-05-04 Thread Oliver Hunt via cfe-commits
@@ -8374,20 +8376,212 @@ static void HandlePtrAuthQualifier(ASTContext &Ctx, QualType &T, IsInvalid |= !S.checkPointerAuthDiscriminatorArg( ExtraDiscriminatorArg, Sema::PADAK_ExtraDiscPtrAuth, ExtraDiscriminator); - if (IsInvalid) { -Attr.setInvalid(); -retur

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-05-04 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/133681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-05-04 Thread kadir çetinkaya via cfe-commits
@@ -158,6 +158,43 @@ TEST(StdLibTests, EndToEnd) { UnorderedElementsAre(StdlibSymbol("list"), StdlibSymbol("vector"))); } +TEST(StdLibTests, StdLibDocComments) { + Config Cfg; + Cfg.Index.StandardLibrary = true; + WithContextValue Enabled(Config::Key, std::move(Cfg));

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-05-04 Thread kadir çetinkaya via cfe-commits
@@ -158,6 +159,42 @@ TEST(StdLibTests, EndToEnd) { UnorderedElementsAre(StdlibSymbol("list"), StdlibSymbol("vector"))); } +TEST(StdLibTests, StdLibDocComments) { + Config Cfg; + Cfg.Index.StandardLibrary = true; + WithContextValue Enabled(Config::Key, std::move(Cfg));

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-05-04 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, LGTM! https://github.com/llvm/llvm-project/pull/133681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Alias iso9899:2024 to C23, update documentation (PR #138459)

2025-05-04 Thread Raul Tambre via cfe-commits
https://github.com/tambry created https://github.com/llvm/llvm-project/pull/138459 None >From 4f4394ff468cb0b398df9e8dab7cf9d18b019c1a Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Sun, 4 May 2025 18:58:13 +0300 Subject: [PATCH] [clang] Alias iso9899:2024 to C23, update documentation ---

[clang] [clang] Alias iso9899:2024 to C23, update documentation (PR #138459)

2025-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Raul Tambre (tambry) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/138459.diff 4 Files Affected: - (modified) clang/docs/CommandGuide/clang.rst (+9) - (modified) clang/docs/ReleaseNotes.rst (+1) - (modified) clang/

[clang] [clang] Add support for Debian 14 Forky and Debian 15 Duke (PR #138460)

2025-05-04 Thread Raul Tambre via cfe-commits
https://github.com/tambry created https://github.com/llvm/llvm-project/pull/138460 Futureproofs our single Debian-specific special case for roughly the next 6 years. See: https://lists.debian.org/debian-devel-announce/2025/01/msg4.html >From 71ed6486e8036682bda9b0f6bd88277c7d927cb2 Mon Se

[clang] [clang] Add support for Debian 14 Forky and Debian 15 Duke (PR #138460)

2025-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Raul Tambre (tambry) Changes Futureproofs our single Debian-specific special case for roughly the next 6 years. See: https://lists.debian.org/debian-devel-announce/2025/01/msg4.html --- Full diff: https://github.com/llvm/llvm-project

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-04 Thread Balazs Benics via cfe-commits
steakhal wrote: FYI, build bots suggests that this PR has build errors. BTW, could you run this under perf stats to demonstrate the reduction of the cache-misses and page-faults? I'd suspect a measurable difference if these separate allocators really help. https://github.com/llvm/llvm-project

[clang] [clang] Add support for Debian 14 Forky and Debian 15 Duke (PR #138460)

2025-05-04 Thread Raul Tambre via cfe-commits
tambry wrote: I have commit access but I'll wait for CI so everything's per the book. :slightly_smiling_face: https://github.com/llvm/llvm-project/pull/138460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang][analyzer] Improve cache locality by using separate allocators (PR #138295)

2025-05-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/138295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Improve cache locality by using separate allocators (PR #138295)

2025-05-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/138295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Attribute support `[[clang::musttail]]` in `ExprConstant.cpp` (work in progress) (PR #138477)

2025-05-04 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot created https://github.com/llvm/llvm-project/pull/138477 This change makes `[[clang::musttail]]` work. Function calls marked with this attribute won't use system stack, but will loop after nearest function call. The attribute is already very strick, and checks all

[clang] Attribute support `[[clang::musttail]]` in `ExprConstant.cpp` (work in progress) (PR #138477)

2025-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Hana Dusíková (hanickadot) Changes This change makes `[[clang::musttail]]` work. Function calls marked with this attribute won't use system stack, but will loop after nearest function call. The attribute is already very strick, and checks

[clang] [clang] Remove unused local variables (NFC) (PR #138468)

2025-05-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-clang-x86_64-linux-debian` running on `gribozavr4` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/6/builds/8904 Here is the relevant piece of t

[clang] Attribute support `[[clang::musttail]]` in `ExprConstant.cpp` (work in progress) (PR #138477)

2025-05-04 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot edited https://github.com/llvm/llvm-project/pull/138477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Attribute support `[[clang::musttail]]` in `ExprConstant.cpp` (work in progress) (PR #138477)

2025-05-04 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot edited https://github.com/llvm/llvm-project/pull/138477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Attribute support `[[clang::musttail]]` in `ExprConstant.cpp` (work in progress) (PR #138477)

2025-05-04 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot edited https://github.com/llvm/llvm-project/pull/138477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [sancov] Introduce optional callback for stack-depth tracking (PR #138323)

2025-05-04 Thread Marco Elver via cfe-commits
https://github.com/melver requested changes to this pull request. This is also missing flag and IR tests. https://github.com/llvm/llvm-project/pull/138323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] [sancov] Introduce optional callback for stack-depth tracking (PR #138323)

2025-05-04 Thread Marco Elver via cfe-commits
@@ -1078,22 +1092,44 @@ void ModuleSanitizerCoverage::InjectCoverageAtBlock(Function &F, BasicBlock &BB, Store->setNoSanitizeMetadata(); } if (Options.StackDepth && IsEntryBB && !IsLeafFunc) { -// Check stack depth. If it's the deepest so far, record it. Modu

[clang] [llvm] [sancov] Introduce optional callback for stack-depth tracking (PR #138323)

2025-05-04 Thread Marco Elver via cfe-commits
@@ -34,6 +34,7 @@ class SanitizerArgs { std::vector CoverageIgnorelistFiles; std::vector BinaryMetadataIgnorelistFiles; int CoverageFeatures = 0; + int StackDepthCallbackMin = 0; melver wrote: `CoverageStackDepthCallbackMin` https://github.com/llvm/llv

[clang] [llvm] [sancov] Introduce optional callback for stack-depth tracking (PR #138323)

2025-05-04 Thread Marco Elver via cfe-commits
https://github.com/melver edited https://github.com/llvm/llvm-project/pull/138323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Attribute support `[[clang::musttail]]` in `ExprConstant.cpp` (work in progress) (PR #138477)

2025-05-04 Thread Hana Dusíková via cfe-commits
hanickadot wrote: ```c++ constexpr int deep_test(int remaining) { if (remaining == 0) { return 42; } MUST_TAIL return deep_test(remaining - 1); } constexpr int result = deep_test(200'000); ``` With debug build of clang: ```sh clang++ -std=c++26 -c deep.cp

[clang] [clang-format] Add SpaceAfterOperatorKeyword option (PR #137610)

2025-05-04 Thread Filip Milosevic via cfe-commits
MightyFilipns wrote: > Please also update the release notes. It should be good now https://github.com/llvm/llvm-project/pull/137610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] raise extension warning for unknown namespaced attributes (PR #120925)

2025-05-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/120925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-05-04 Thread via cfe-commits
https://github.com/halbi2 updated https://github.com/llvm/llvm-project/pull/137899 >From 238d73776c85ed22386ac494f275261638cd40d3 Mon Sep 17 00:00:00 2001 From: halbi2 Date: Mon, 28 Apr 2025 20:07:43 -0400 Subject: [PATCH] [clang] Warn about deprecated volatile-qualified return types The old c

[clang] [clang] Warn about deprecated volatile-qualified return types (PR #137899)

2025-05-04 Thread via cfe-commits
halbi2 wrote: @shafik I have changed the commit message, can you please look again? https://github.com/llvm/llvm-project/pull/137899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [sancov] Introduce optional callback for stack-depth tracking (PR #138323)

2025-05-04 Thread Kees Cook via cfe-commits
https://github.com/kees updated https://github.com/llvm/llvm-project/pull/138323 >From 729d249d3848c2e417174ed935bfefde5c048dc7 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Fri, 2 May 2025 10:51:02 -0700 Subject: [PATCH] [sancov] Introduce optional callback for stack-depth tracking Normally -

[clang] aafbdde - [clang-linker-wrapper] Remove unused local variables (NFC) (#138480)

2025-05-04 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-05-04T20:36:07-07:00 New Revision: aafbddee808b8c81e2401ddcb6803f582ccb6892 URL: https://github.com/llvm/llvm-project/commit/aafbddee808b8c81e2401ddcb6803f582ccb6892 DIFF: https://github.com/llvm/llvm-project/commit/aafbddee808b8c81e2401ddcb6803f582ccb6892.diff L

[clang] [clang-linker-wrapper] Remove unused local variables (NFC) (PR #138480)

2025-05-04 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/138480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [sancov] Introduce optional callback for stack-depth tracking (PR #138323)

2025-05-04 Thread Kees Cook via cfe-commits
https://github.com/kees updated https://github.com/llvm/llvm-project/pull/138323 >From 027ff82e738f6bdf82f958a4774eb05d321b23ef Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Fri, 2 May 2025 10:51:02 -0700 Subject: [PATCH] [sancov] Introduce optional callback for stack-depth tracking Normally -

[clang] [llvm] [sancov] Introduce optional callback for stack-depth tracking (PR #138323)

2025-05-04 Thread Kees Cook via cfe-commits
@@ -34,6 +34,7 @@ class SanitizerArgs { std::vector CoverageIgnorelistFiles; std::vector BinaryMetadataIgnorelistFiles; int CoverageFeatures = 0; + int StackDepthCallbackMin = 0; kees wrote: Fixed. https://github.com/llvm/llvm-project/pull/138323 _

[clang] [clang-linker-wrapper] Remove unused local variables (NFC) (PR #138480)

2025-05-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/11249 Here is the relevant piece of the build log f

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-05-04 Thread Aniket Lal via cfe-commits
https://github.com/lalaniket8 updated https://github.com/llvm/llvm-project/pull/137769 >From aa151fcda1cb73edc9564f6e2494699046254350 Mon Sep 17 00:00:00 2001 From: anikelal Date: Tue, 29 Apr 2025 13:59:48 +0530 Subject: [PATCH] add alwaysinline attribute to stubs --- clang/lib/CodeGen/CodeGe

[clang] [llvm] [OpenMP] Remove 'libomptarget.devicertl.a' fatbinary and use static library (PR #126143)

2025-05-04 Thread Ye Luo via cfe-commits
@@ -142,99 +125,40 @@ function(compileDeviceRTLLibrary target_name target_triple) endif() set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${outfile}) -list(APPEND bc_files ${outfile}) +list(APPEND obj_files ${CMAKE_CURRENT_BINARY_DIR}/${out

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-05-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/138482 This adds a number of builtins to query the ptrauth schema of an arbitrary type in a way that can be fed into other ptrauth qualifiers. >From e84310f8a57a3f9b75dfc7260137e984d7f55f87 Mon Sep 17 00:00:00 2001 Fro

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-05-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Oliver Hunt (ojhunt) Changes This adds a number of builtins to query the ptrauth schema of an arbitrary type in a way that can be fed into other ptrauth qualifiers. --- Patch is 34.90 KiB, truncated to

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-05-04 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Adding @cor3ntin and @AaronBallman in case they have a better idea for getting the function key to Sema than having it duplicated in langopts and codegen options https://github.com/llvm/llvm-project/pull/138482 ___ cfe-commits mailing l

[clang] [clang][ptrauth] Add support for querying the ptrauth schema of a type (PR #138482)

2025-05-04 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Also the associated tests do not pass yet as they're blocked on https://github.com/llvm/llvm-project/pull/136828 and other ptrauth PRs https://github.com/llvm/llvm-project/pull/138482 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [llvm] [BasicAA] Do not decompose past casts with different index width (PR #119365)

2025-05-04 Thread via cfe-commits
liushuyu wrote: Hi there, It seems like after this pull request, the following C code will crash LLVM if LLVM assertion is enabled: Godbolt link: https://godbolt.org/z/91bqnYsb4 ```c #include #include #if SIZE_MAX != UINT32_MAX #error "This reproducer only works on 32-bit targets" #endif

<    1   2