[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -3503,9 +3518,23 @@ bool FunctionDecl::isDestroyingOperatorDelete() const { getNumParams() < 2) return false; - auto *RD = getParamDecl(1)->getType()->getAsCXXRecordDecl(); - return RD && RD->isInStdNamespace() && RD->getIdentifier() && - RD->getIdentifi

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -2520,6 +2520,18 @@ class FunctionDecl : public DeclaratorDecl, /// If this function is an allocation/deallocation function that takes /// the `std::nothrow_t` tag, return true through IsNothrow, bool isReplaceableGlobalAllocationFunction( + std::optional *Alignme

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -2533,9 +2533,43 @@ bool CXXMethodDecl::isUsualDeallocationFunction( getOverloadedOperator() != OO_Array_Delete) ojhunt wrote: Shall I just do a global search/replace/update? Actually maybe I should just do that as a separate PR? https://github.com/ll

[clang] [NFC] [clang] rename InlinedTrapFuncMap to InlinedSubprogramMap (PR #132993)

2025-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Florian Mayer (fmayer) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/132993.diff 2 Files Affected: - (modified) clang/lib/CodeGen/CGDebugInfo.cpp (+1-1) - (modified) clang/lib/CodeGen/CGDebugInfo.h (+1-1)

[clang] [clang][DepScan] Allow ModuleDep to be const (PR #132968)

2025-03-25 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/132968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DepScan] Allow ModuleDep to be const (PR #132968)

2025-03-25 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/132968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-03-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff cc86d7cb191a64489e837c68f299abb930f5c6cb f5195b8d3d7ac00e8a0a54c10be485d69a576ba5 --e

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Mohamed Emad (hulxv) Changes Closes #132983 --- Full diff: https://github.com/llvm/llvm-project/pull/132991.diff 2 Files Affected: - (modified) clang-tools-extra/include-cleaner/test/tool.cpp (+2-2) - (modified) clang-tools

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-03-25 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv created https://github.com/llvm/llvm-project/pull/132991 Closes #132983 >From c476948593a80ed31765cdd711a626e4e03930ab Mon Sep 17 00:00:00 2001 From: hulxv Date: Tue, 25 Mar 2025 22:56:51 +0200 Subject: [PATCH] [include-cleaner] rename enabled flags to `disable-*` ---

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,277 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,277 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-03-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/132990 >From 2873bb1aee5470ecd7fa66c1f255bfe8b26dbc68 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 17 Mar 2025 11:20:21 -0700 Subject: [PATCH] [clang] fix constexpr-unknown handling of self-references.

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,277 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,277 @@ +//===--- CIRGenExprAgg.cpp - Emit CIR Code from Aggregate Expressions -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CIR] Add binary operators (PR #132420)

2025-03-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/132420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/132939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-25 Thread Shafik Yaghmour via cfe-commits
@@ -4567,8 +4567,9 @@ namespace { Reader.getOwningModuleFile(Cat)) { StructuralEquivalenceContext::NonEquivalentDeclSet NonEquivalentDecls; StructuralEquivalenceContext Ctx( - Cat->getASTContext(), Existing->getASTCo

[clang] [HLSL] Add new double overloads for math builtins (PR #132979)

2025-03-25 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/132979 >From 5facb02ef4df5e0da31b6adef66f0b72309b99df Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Mon, 24 Mar 2025 17:15:54 -0700 Subject: [PATCH 1/4] new double overloads + tests --- clang/lib/Frontend/InitPrepro

[clang] [NFC] [clang] rename InlinedTrapFuncMap to InlinedSubprogramMap (PR #132993)

2025-03-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/132993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread Oliver Hunt via cfe-commits
@@ -16298,6 +16396,70 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor, return Invalid; } +bool Sema::isTypeAwareOperatorNewOrDelete(const NamedDecl *ND) const { + const FunctionDecl *FnDecl = nullptr; + if (auto *FTD = dyn_cast(ND)) +FnDecl = FTD

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-25 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/132288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Michael Spencer (Bigcheese) Changes Now that we have ModuleMapFile.cpp which parses module maps, it's confusing what ModuleMap::parseModuleMapFile actually does. HeaderSearch already called this loading a module map, so consistent

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-25 Thread Paul Kirth via cfe-commits
ilovepi wrote: The patch is mostly in good shape. However, there is a build error. you can see it in the premerge CI. looks like you need to update the initialization of the clang doc context objects. Also you need to `git clang-format HEAD~` on your patch to get formatting check to pass. Aft

[clang-tools-extra] 3bcbb47 - [clangd] Use `SymbolName` to represent Objective-C selectors (#82061)

2025-03-25 Thread via cfe-commits
Author: Alex Hoppen Date: 2025-03-25T14:34:00-04:00 New Revision: 3bcbb472586fddf66c58011e57e08550d59ea8e5 URL: https://github.com/llvm/llvm-project/commit/3bcbb472586fddf66c58011e57e08550d59ea8e5 DIFF: https://github.com/llvm/llvm-project/commit/3bcbb472586fddf66c58011e57e08550d59ea8e5.diff L

[clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2025-03-25 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman closed https://github.com/llvm/llvm-project/pull/82061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (PR #132317)

2025-03-25 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Reduced test case: https://gcc.godbolt.org/z/7xxfsj4vv ``` struct A { template A(T); }; struct C; template void d(void (T::*)()); void f(A); void g() { f(d); } ``` Please revert or fix soon. Thanks! https://github.com/llvm/llvm-project/pull/132317

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread Jan Svoboda via cfe-commits
@@ -2136,20 +2136,20 @@ bool ModuleMap::parseModuleMapFile(FileEntryRef File, bool IsSystem, assert(Target && "Missing target information"); std::optional Buffer = SourceMgr.getBufferOrNone(ID); if (!Buffer) -return ParsedModuleMap[File] = true; +return LoadedMod

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/132970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. Nice clarification, thanks! https://github.com/llvm/llvm-project/pull/132970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread Jan Svoboda via cfe-commits
@@ -2136,20 +2136,20 @@ bool ModuleMap::parseModuleMapFile(FileEntryRef File, bool IsSystem, assert(Target && "Missing target information"); std::optional Buffer = SourceMgr.getBufferOrNone(ID); if (!Buffer) -return ParsedModuleMap[File] = true; +return LoadedMod

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-25 Thread Yanzuo Liu via cfe-commits
@@ -32,6 +32,26 @@ enum E2 : S::I { e }; #endif } // namespace cwg2516 +namespace cwg2517 { // cwg2517: 21 +#if __cplusplus >= 202302L zwuis wrote: IIUC this DR is applied to C++20. https://github.com/llvm/llvm-project/pull/132919 ___

[clang] f7f5aa2 - [Clang][AMDGPU] Use size_t to compare with npos (#132868)

2025-03-25 Thread via cfe-commits
Author: Jinsong Ji Date: 2025-03-25T14:34:12-04:00 New Revision: f7f5aa217a81f2ec036fee765124bd2057531d86 URL: https://github.com/llvm/llvm-project/commit/f7f5aa217a81f2ec036fee765124bd2057531d86 DIFF: https://github.com/llvm/llvm-project/commit/f7f5aa217a81f2ec036fee765124bd2057531d86.diff LO

[clang] [Clang][AMDGPU] Use size_t to compare with npos (PR #132868)

2025-03-25 Thread Jinsong Ji via cfe-commits
https://github.com/jsji closed https://github.com/llvm/llvm-project/pull/132868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Apart from the docstrings, this looks good. Thanks for the changes :-) https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tarun Prabhu via cfe-commits
@@ -3177,3 +3177,25 @@ bool tools::shouldEnableVectorizerAtOLevel(const ArgList &Args, bool isSlpVec) { return false; } + +/// Enable -fvectorize based on the optimization level selected. +void tools::handleVectorizeLoopsArgs(const ArgList &Args, +

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/132801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-25 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/131280 >From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001 From: hulxv Date: Fri, 14 Mar 2025 07:39:15 +0200 Subject: [PATCH 01/17] [clang-doc] [feat] add `--repository-line-prefix` argument (fix #59

[clang] [Sema] Fix tautological bounds check warning with -fwrapv (PR #120480)

2025-03-25 Thread Andrew Pinski via cfe-commits
pinskia wrote: Shouldn't this be part of -Wstrict-overflow instead of -Wtautological-compare ? https://github.com/llvm/llvm-project/pull/120480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [flang] [flang] Add -f[no-]slp-vectorize flags (PR #132801)

2025-03-25 Thread Tarun Prabhu via cfe-commits
@@ -3177,3 +3177,25 @@ bool tools::shouldEnableVectorizerAtOLevel(const ArgList &Args, bool isSlpVec) { return false; } + +/// Enable -fvectorize based on the optimization level selected. tarunprabhu wrote: It might be better to move the docstrings to `Com

[clang] [HLSL] Add new double overloads for math builtins (PR #132979)

2025-03-25 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/132979 Add double overloads which cast the double to a float and call the float builtin. Makes these double overloads conditional on hlsl version 202x or earlier. Add tests Closes #128228 >From 5facb02ef4df5e0da31b6ade

[clang] [CIR] Add binary operators (PR #132420)

2025-03-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/132420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add new double overloads for math builtins (PR #132979)

2025-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Sarah Spall (spall) Changes Add double overloads which cast the double to a float and call the float builtin. Makes these double overloads conditional on hlsl version 202x or earlier. Add tests Closes #1282

[clang] [compiler-rt] [libc] [libcxx] [llvm] [Clang][AMDGPU] Remove special handling for COV4 libraries (PR #132870)

2025-03-25 Thread Michael Jones via cfe-commits
https://github.com/michaelrj-google approved this pull request. LGTM from the libc side https://github.com/llvm/llvm-project/pull/132870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][lex] Store non-owning options ref in `HeaderSearch` (PR #132780)

2025-03-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `cross-project-tests-sie-ubuntu` running on `doug-worker-1a` while building `clang-tools-extra,clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/181/builds/16262 H

[clang] [clang-tools-extra] [clang][lex] Store non-owning options ref in `HeaderSearch` (PR #132780)

2025-03-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-ubuntu` running on `as-builder-9` while building `clang-tools-extra,clang` at step 7 "build-default". Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/6707 Here is the rel

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang-tools-extra,clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/16245 Here is the relevant piece o

[clang] [clang] Placement new error when modifying consts (PR #132460)

2025-03-25 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/132460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang-tools-extra,clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/2125

[clang] [CodeGen][NFC] Run SROA on complex range tests (PR #131925)

2025-03-25 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis edited https://github.com/llvm/llvm-project/pull/131925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen][NFC] Run SROA on complex range tests (PR #131925)

2025-03-25 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis ready_for_review https://github.com/llvm/llvm-project/pull/131925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-25 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,183 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -O1 -o - |

[clang] [HLSL] Add new double overloads for math builtins (PR #132979)

2025-03-25 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/132979 >From 5facb02ef4df5e0da31b6adef66f0b72309b99df Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Mon, 24 Mar 2025 17:15:54 -0700 Subject: [PATCH 1/2] new double overloads + tests --- clang/lib/Frontend/InitPrepro

[clang-tools-extra] aacc4e9 - [modularize] Fix the build

2025-03-25 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2025-03-25T12:41:41-07:00 New Revision: aacc4e9a38ad93482e6c19a53eefec8406ee1b40 URL: https://github.com/llvm/llvm-project/commit/aacc4e9a38ad93482e6c19a53eefec8406ee1b40 DIFF: https://github.com/llvm/llvm-project/commit/aacc4e9a38ad93482e6c19a53eefec8406ee1b40.diff L

[clang] [CodeGen][NFC] Run SROA on complex range tests (PR #131925)

2025-03-25 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: > Running both mem2reg and sroa is redunant; just run sroa. > > If the undefs are getting introduced by sroa, that's fine; they'll go away > when we fix sroa. Okay, thanks. I've updated the PR to remove explicit mem2reg. https://github.com/llvm/llvm-project/pull/131925 ___

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: @Bigcheese I've landed aacc4e9a38ad93482e6c19a53eefec8406ee1b40 to fix the build. Thanks! https://github.com/llvm/llvm-project/pull/132970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang-tools-extra,clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/17095 Here is

[clang] [HLSL] Add new double overloads for math builtins (PR #132979)

2025-03-25 Thread Chris B via cfe-commits
@@ -16,6 +16,84 @@ namespace hlsl { // unsigned integer and floating point. Keeping this ordering consistent will // help keep this file manageable as it grows. +#define _DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(fn) \ + constexpr float fn(double V) {

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -2234,6 +2234,101 @@ enum class CXXNewInitializationStyle { Braces }; +enum class TypeAwareAllocationMode : unsigned { No, Yes }; +inline bool isTypeAwareAllocation(TypeAwareAllocationMode Mode) { + return Mode == TypeAwareAllocationMode::Yes; +} +inline TypeAwareAllocat

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -2520,6 +2520,18 @@ class FunctionDecl : public DeclaratorDecl, /// If this function is an allocation/deallocation function that takes /// the `std::nothrow_t` tag, return true through IsNothrow, bool isReplaceableGlobalAllocationFunction( + std::optional *Alignme

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -9784,10 +9850,16 @@ bool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, //results in an ambiguity or in a function that is deleted or inaccessible if (CSM == CXXSpecialMemberKind::Destructor && MD->isVirtual()) { FunctionDecl *OperatorDelete = nullptr; +

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -2527,6 +2527,32 @@ class FunctionDecl : public DeclaratorDecl, /// If this function is an allocation/deallocation function that takes /// the `std::nothrow_t` tag, return true through IsNothrow, bool isReplaceableGlobalAllocationFunction( + std::optional *Alignme

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -16147,6 +16169,108 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor, return Invalid; } +bool Sema::isTypeAwareOperatorNewOrDelete(const NamedDecl *ND) const { + const FunctionDecl *FnDecl = nullptr; + if (auto *FTD = dyn_cast(ND)) +FnDecl = FT

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -9817,27 +9817,54 @@ def err_operator_new_delete_invalid_result_type : Error< def err_operator_new_delete_dependent_result_type : Error< "%0 cannot have a dependent return type; use %1 instead">; def err_operator_new_delete_too_few_parameters : Error< - "%0 must have at l

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -3849,7 +4119,15 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, // delete. This is only necessary if we selected a destroying operator // delete that we are going to call (non-virtually); converting to void* // is trivial and left to AST consum

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -16223,6 +16324,70 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor, return Invalid; } +bool Sema::isTypeAwareOperatorNewOrDelete(const NamedDecl *ND) const { + const FunctionDecl *FnDecl = nullptr; cor3ntin wrote: I don't think so

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
https://github.com/cor3ntin commented: I think I have found all your comments that needed a follow-up :) https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [NFC] [clang] rename InlinedTrapFuncMap to InlinedSubprogramMap (PR #132993)

2025-03-25 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/132993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5427973 - [NFC] [clang] rename InlinedTrapFuncMap to InlinedSubprogramMap (#132993)

2025-03-25 Thread via cfe-commits
Author: Florian Mayer Date: 2025-03-25T15:03:04-07:00 New Revision: 542797317ae4e98c8aa9030368d851fc72070f95 URL: https://github.com/llvm/llvm-project/commit/542797317ae4e98c8aa9030368d851fc72070f95 DIFF: https://github.com/llvm/llvm-project/commit/542797317ae4e98c8aa9030368d851fc72070f95.diff

[clang] [CIR] Add binary operators (PR #132420)

2025-03-25 Thread Andy Kaylor via cfe-commits
@@ -127,6 +135,8 @@ struct MissingFeatures { static bool ternaryOp() { return false; } static bool tryOp() { return false; } static bool zextOp() { return false; } + static bool ptrStrideOp() { return false; } andykaylor wrote: @AmrDeveloper Be sure to

[clang] [CIR] Add binary operators (PR #132420)

2025-03-25 Thread Andy Kaylor via cfe-commits
@@ -35,6 +83,22 @@ class ScalarExprEmitter : public StmtVisitor { ScalarExprEmitter(CIRGenFunction &cgf, CIRGenBuilderTy &builder) : cgf(cgf), builder(builder) {} + //======// + //

[clang] [CIR] Add binary operators (PR #132420)

2025-03-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/132420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix crash with ADL for member pointers with dependent class (PR #132977)

2025-03-25 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Since this fixes a regression recently introduced, which was picked up by upstream users, I will land this as soon as pre-commit checks are done. https://github.com/llvm/llvm-project/pull/132977 ___ cfe-commits mailing list cfe-commits

[clang] [CIR] Add binary operators (PR #132420)

2025-03-25 Thread Andy Kaylor via cfe-commits
@@ -1133,6 +1252,7 @@ void ConvertCIRToLLVMPass::runOnOperation() { patterns.add< // clang-format off CIRToLLVMBrCondOpLowering, + CIRToLLVMBinOpLowering, andykaylor wrote: This list is alphabetical (for consistency in reba

[clang] [llvm] [MIPS] Define SubTargetFeature for i6500 cpu (PR #132907)

2025-03-25 Thread Djordje Todorovic via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang --target=mips64-linux-gnu -mcpu=i6400 -o %t -c %s 2>&1 | FileCheck --allow-empty %s +// CHECK-NOT: {{.*}} is not a recognized feature for this target + djtodoro wrote: nit: no need for 2 newlines here https://github.com/llvm/llvm

[libclc] [libclc] Move log1p/asinh/acosh/atanh to the CLC library (PR #132956)

2025-03-25 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/132956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4067581 - [clang] Placement new error when modifying consts (#132460)

2025-03-25 Thread via cfe-commits
Author: marius doerner Date: 2025-03-25T20:39:12+01:00 New Revision: 4067581aea299692d37866183b0a535f561892ad URL: https://github.com/llvm/llvm-project/commit/4067581aea299692d37866183b0a535f561892ad DIFF: https://github.com/llvm/llvm-project/commit/4067581aea299692d37866183b0a535f561892ad.diff

[clang] [Clang][AMDGPU] Use size_t to compare with npos (PR #132868)

2025-03-25 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu commented: Thanks for fixing this. https://github.com/llvm/llvm-project/pull/132868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -4778,6 +4784,16 @@ class Sema final : public SemaBase { CXXRecordDecl *getStdBadAlloc() const; EnumDecl *getStdAlignValT() const; + const ClassTemplateDecl *getStdTypeIdentity() const; + ClassTemplateDecl *getStdTypeIdentity(); + std::optional instantiateSpecialized

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -2234,6 +2234,101 @@ enum class CXXNewInitializationStyle { Braces }; +enum class TypeAwareAllocationMode : unsigned { No, Yes }; +inline bool isTypeAwareAllocation(TypeAwareAllocationMode Mode) { + return Mode == TypeAwareAllocationMode::Yes; +} +inline TypeAwareAllocat

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-25 Thread via cfe-commits
@@ -3482,15 +3486,40 @@ bool FunctionDecl::isDestroyingOperatorDelete() const { // Within a class C, a single object deallocation function with signature // (T, std::destroying_delete_t, ) // is a destroying operator delete. - if (!isa(this) || getOverloadedOpera

[clang] [clang][DepScan] Allow ModuleDep to be const (PR #132968)

2025-03-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/14918 Here is the relevant piece of the

[clang] [clang] fix constexpr-unknown handling of self-references. (PR #132990)

2025-03-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes Usually, in constant evaluation, references which are local to the evaluation have to be initialized before they're accessed. However, there's one funny special case: the initializer of a reference ca

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-25 Thread Kaitlin Peng via cfe-commits
@@ -101,6 +101,52 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned BuiltinID, TheCall->setType(RetTy); break; } + case SPIRV::BI__builtin_spirv_smoothstep: { +if (SemaRef.checkArgCount(TheCall, 3)) + return true; + +// check if the all argument

[clang-tools-extra] 7a37074 - [clang][lex] Store non-owning options ref in `HeaderSearch` (#132780)

2025-03-25 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-03-25T12:14:06-07:00 New Revision: 7a370748c0928b9ccfe26127e54eb3c1a1827d75 URL: https://github.com/llvm/llvm-project/commit/7a370748c0928b9ccfe26127e54eb3c1a1827d75 DIFF: https://github.com/llvm/llvm-project/commit/7a370748c0928b9ccfe26127e54eb3c1a1827d75.diff L

[clang] [clang-tools-extra] [clang][lex] Store non-owning options ref in `HeaderSearch` (PR #132780)

2025-03-25 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/132780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-25 Thread Farzon Lotfi via cfe-commits
@@ -25,3 +25,9 @@ def SPIRVReflect : Builtin { let Attributes = [NoThrow, Const]; let Prototype = "void(...)"; } + +def SPIRVSmoothStep : Builtin { + let Spellings = ["__builtin_spirv_smoothstep"]; + let Attributes = [NoThrow, Const]; farzonl wrote: do w

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-03-25 Thread Austin Schuh via cfe-commits
https://github.com/AustinSchuh updated https://github.com/llvm/llvm-project/pull/132881 >From 381ba9f21b4c2a2c4028143b84e9f71c8a20692f Mon Sep 17 00:00:00 2001 From: Austin Schuh Date: Mon, 24 Mar 2025 21:42:45 -0700 Subject: [PATCH 1/2] cuda clang: Fix argument order for __reduce_max_sync The

[clang] [clang-format] Handle C++ keywords in other languages better (PR #132941)

2025-03-25 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/132941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-03-25 Thread Austin Schuh via cfe-commits
@@ -315,7 +315,7 @@ defm MATCH_ALLP_SYNC_64 : MATCH_ALLP_SYNC { def : NVPTXInst<(outs Int32Regs:$dst), (ins Int32Regs:$src, Int32Regs:$mask), "redux.sync." # BinOp # "." # PTXType # " $dst, $src, $mask;", - [(set i32:$dst, (Intrin i32:$src, Int32Regs:$mask))

[clang] [CIR] Add binary operators (PR #132420)

2025-03-25 Thread Andy Kaylor via cfe-commits
@@ -168,24 +168,9 @@ static bool MustVisitNullValue(const Expr *E) { return E->getType()->isNullPtrType(); } -/// If \p E is a widened promoted integer, get its base (unpromoted) type. -static std::optional getUnwidenedIntegerType(const ASTContext &Ctx, -

[clang] [clang-tools-extra] [clang][lex] Store non-owning options ref in `HeaderSearch` (PR #132780)

2025-03-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang-tools-extra,clang` at step 4 "build". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/13498 Here is the relevant p

[clang] [clang-tools-extra] [clang][lex] Store non-owning options ref in `HeaderSearch` (PR #132780)

2025-03-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang-tools-extra,clang` at step 4 "build". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/18869 Here is the relevant p

[clang] [compiler-rt] [libc] [libcxx] [llvm] [Clang][AMDGPU] Remove special handling for COV4 libraries (PR #132870)

2025-03-25 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. Waiving `reviewers/libcxx` code review. https://github.com/llvm/llvm-project/pull/132870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang-tools-extra] [clang][lex] Store non-owning options ref in `HeaderSearch` (PR #132780)

2025-03-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang-tools-extra,clang` at step 4 "build". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/14914 Here is the re

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-25 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/131280 >From bf9bd4156cb7f652c9cf0477f537e5c58b470448 Mon Sep 17 00:00:00 2001 From: hulxv Date: Fri, 14 Mar 2025 07:39:15 +0200 Subject: [PATCH 01/15] [clang-doc] [feat] add `--repository-line-prefix` argument (fix #59

[clang] 9aecbdf - [clang][DepScan] Allow ModuleDep to be const (#132968)

2025-03-25 Thread via cfe-commits
Author: Cyndy Ishida Date: 2025-03-25T13:13:58-07:00 New Revision: 9aecbdf8ed787a8edd1b7f97a1c7fbf6e9d12515 URL: https://github.com/llvm/llvm-project/commit/9aecbdf8ed787a8edd1b7f97a1c7fbf6e9d12515 DIFF: https://github.com/llvm/llvm-project/commit/9aecbdf8ed787a8edd1b7f97a1c7fbf6e9d12515.diff

[clang] [Driver] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #132821)

2025-03-25 Thread Daniel Chen via cfe-commits
DanielCChen wrote: > I think this should also impact the set of headers being searched. On > per-target runtimes, I think we look for libc++ headers under > `include/c++/v1/` in addition to `include/c++/v1` (since that's where > `__config_site` ends up)? I'm not super familiar with that config

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

2025-03-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/132468 >From 9e84f55c840890befed2720e498c068ff4ca36cd Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 21 Mar 2025 13:11:11 -0700 Subject: [PATCH 1/4] [CIR] Emit allocas into the proper lexical scope Alloca op

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-03-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang-tools-extra,clang` at step 6 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/26902 Here

[clang] [llvm] cuda clang: Fix argument order for __reduce_max_sync (PR #132881)

2025-03-25 Thread Artem Belevich via cfe-commits
@@ -315,7 +315,7 @@ defm MATCH_ALLP_SYNC_64 : MATCH_ALLP_SYNC { def : NVPTXInst<(outs Int32Regs:$dst), (ins Int32Regs:$src, Int32Regs:$mask), "redux.sync." # BinOp # "." # PTXType # " $dst, $src, $mask;", - [(set i32:$dst, (Intrin i32:$src, Int32Regs:$mask))

<    1   2   3   4   5   6   >