[clang] [clang][AST] Add `RecordDecl::getNumFields()` (PR #170022)

2025-11-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/170022 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bbb0dba - [clang][AST] Add `RecordDecl::getNumFields()` (#170022)

2025-11-30 Thread via cfe-commits
Author: Timm Baeder Date: 2025-12-01T08:33:54+01:00 New Revision: bbb0dbadfaf292766922f5914f1c8946e2ef8519 URL: https://github.com/llvm/llvm-project/commit/bbb0dbadfaf292766922f5914f1c8946e2ef8519 DIFF: https://github.com/llvm/llvm-project/commit/bbb0dbadfaf292766922f5914f1c8946e2ef8519.diff L

[clang] [llvm] [clang][NVPTX] Add missing half-precision add/sub/fma intrinsics (PR #170079)

2025-11-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Srinivasa Ravi (Wolfram70) Changes This change adds the following missing half-precision add/sub/fma intrinsics for the NVPTX target: - `llvm.nvvm.add.rn{.ftz}.sat.f16` - `llvm.nvvm.add.rn{.ftz}.sat.f16x2` - `llvm.nvvm.sub.rn{.ftz}.sat.f1

[clang] [llvm] [clang][NVPTX] Add missing half-precision add/sub/fma intrinsics (PR #170079)

2025-11-30 Thread Srinivasa Ravi via cfe-commits
https://github.com/Wolfram70 created https://github.com/llvm/llvm-project/pull/170079 This change adds the following missing half-precision add/sub/fma intrinsics for the NVPTX target: - `llvm.nvvm.add.rn{.ftz}.sat.f16` - `llvm.nvvm.add.rn{.ftz}.sat.f16x2` - `llvm.nvvm.sub.rn{.ftz}.sat.f16` - `l

[clang] [LifetimeSafety] Suggest lifetime annotations (PR #169767)

2025-11-30 Thread Kashika Akhouri via cfe-commits
@@ -132,6 +153,13 @@ class LifetimeChecker { llvm_unreachable("Unhandled CausingFact type"); } } + + void issueAnnotationWarnings() { kashika0112 wrote: Done https://github.com/llvm/llvm-project/pull/169767 _

[clang] [llvm] [Clang][OpenMP] Handle check for non-contiguous mapping in pointer-based array sections (PR #157443)

2025-11-30 Thread Amit Tiwari via cfe-commits
https://github.com/amitamd7 converted_to_draft https://github.com/llvm/llvm-project/pull/157443 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Suggest lifetime annotations (PR #169767)

2025-11-30 Thread Kashika Akhouri via cfe-commits
https://github.com/kashika0112 updated https://github.com/llvm/llvm-project/pull/169767 >From 00494b03dd31a4a1e541fb45bd524ee452541208 Mon Sep 17 00:00:00 2001 From: Kashika Akhouri Date: Thu, 27 Nov 2025 07:13:49 + Subject: [PATCH 1/8] Add lifetime annotation suggestion --- .../Analyses/

[clang] [CIR][X86] Implement lowering for pmuldq / pmuludq builtins (PR #169853)

2025-11-30 Thread via cfe-commits
https://github.com/GeneraluseAI updated https://github.com/llvm/llvm-project/pull/169853 >From 14da804859f903a8527147d5566f249440ca9209 Mon Sep 17 00:00:00 2001 From: generaluseai Date: Fri, 28 Nov 2025 03:05:24 +0800 Subject: [PATCH] [CIR][X86] Implement lowering for pmuldq / pmuludq builtins

[clang] [CIR][X86] Implement lowering for pmuldq / pmuludq builtins (PR #169853)

2025-11-30 Thread via cfe-commits
https://github.com/GeneraluseAI updated https://github.com/llvm/llvm-project/pull/169853 >From cdaefb1a3757691ca56d4068e0e317f585504a3c Mon Sep 17 00:00:00 2001 From: generaluseai Date: Fri, 28 Nov 2025 03:05:24 +0800 Subject: [PATCH] [CIR][X86] Implement lowering for pmuldq / pmuludq builtins

[clang] [CIR][X86] Implement lowering for pmuldq / pmuludq builtins (PR #169853)

2025-11-30 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 origin/main HEAD --extensions cpp,c -- clang/test/CIR/CodeGenBuiltins/X86/avx2-builti

[clang] [CIR][X86] Implement lowering for pmuldq / pmuludq builtins (PR #169853)

2025-11-30 Thread via cfe-commits
https://github.com/GeneraluseAI updated https://github.com/llvm/llvm-project/pull/169853 >From 41fa386a1fbfe6b8503a04d01c94fc794df04176 Mon Sep 17 00:00:00 2001 From: generaluseai Date: Fri, 28 Nov 2025 03:05:24 +0800 Subject: [PATCH] [CIR][X86] Implement lowering for pmuldq / pmuludq builtins

[clang] [CIR][X86] Implement lowering for AVX512 ktest builtins (PR #169985)

2025-11-30 Thread via cfe-commits
https://github.com/GeneraluseAI updated https://github.com/llvm/llvm-project/pull/169985 >From 7308ac1247cf6c243880a6d4f23d0517da15d774 Mon Sep 17 00:00:00 2001 From: generaluseai Date: Sat, 29 Nov 2025 18:16:55 +0800 Subject: [PATCH] [CIR][X86] Implement lowering for AVX512 ktest builtins (ko

[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX512 kmov intrinsics to be used in constexp (PR #169895)

2025-11-30 Thread Muhammad Abdul via cfe-commits
0xzre wrote: @RKSimon sorry I forgot to change the other TEST_CONSTEXPR in this PR, will request review again for that matter later. thank you https://github.com/llvm/llvm-project/pull/169895 ___ cfe-commits mailing list [email protected] htt

[clang] [CLANG] Fixes the crash on the use of nested requirements in require expressions (PR #169876)

2025-11-30 Thread Ebin Jose via cfe-commits
https://github.com/ebinjose02 updated https://github.com/llvm/llvm-project/pull/169876 >From af9b88da83a7f2954a3a8ddc5f4796f2017ceaec Mon Sep 17 00:00:00 2001 From: ebinjose02 Date: Fri, 28 Nov 2025 06:46:40 + Subject: [PATCH] Fixes #165386 Nested requirements in requires-expressions must

[clang] [CLANG] Fixes the issue with using bool in builtin_bswapg (PR #169285)

2025-11-30 Thread Ebin Jose via cfe-commits
https://github.com/ebinjose02 updated https://github.com/llvm/llvm-project/pull/169285 >From 4baf6aac54499c5fdbeab33a4dc956487b4b5c02 Mon Sep 17 00:00:00 2001 From: ebinjose02 Date: Mon, 24 Nov 2025 07:02:26 + Subject: [PATCH] Fixes #168690 Prevents assertion in CGBuiltin for i1 - returns

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-11-30 Thread Hamza Hassanain via cfe-commits
@@ -12165,7 +12165,36 @@ static bool evalShuffleGeneric( Out = APValue(ResultElements.data(), ResultElements.size()); return true; } +static bool ConvertDoubleToFloatStrict(EvalInfo &Info, const Expr *E, HamzaHassanain wrote: Thanks for the note. Let me c

[clang] [CIR] Upstream CIR codegen for vec_set x86 builtin (PR #169265)

2025-11-30 Thread Jianjian Guan via cfe-commits
jacquesguan wrote: > LGTM aside from the one comment Addressed. https://github.com/llvm/llvm-project/pull/169265 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CIR codegen for vec_set x86 builtin (PR #169265)

2025-11-30 Thread Jianjian Guan via cfe-commits
https://github.com/jacquesguan updated https://github.com/llvm/llvm-project/pull/169265 >From ba7b3959d58847e09bafcd54598530bb13ded07b Mon Sep 17 00:00:00 2001 From: Jianjian GUAN Date: Fri, 21 Nov 2025 14:55:38 +0800 Subject: [PATCH 1/3] [CIR] Upstream CIR codegen for vec_set x86 builtin Supp

[clang] [llvm] [ARM] enable FENV_ACCESS pragma support for hard-float targets (PR #137101)

2025-11-30 Thread David Green via cfe-commits
davemgreen wrote: I put together these for the various MVE intrinsics https://github.com/llvm/llvm-project/pull/169156 https://github.com/llvm/llvm-project/pull/169771 https://github.com/llvm/llvm-project/pull/169798 https://github.com/llvm/llvm-project/pull/169797 https://github.com/llvm/llvm-pr

[clang] [llvm] [ARM] enable FENV_ACCESS pragma support for hard-float targets (PR #137101)

2025-11-30 Thread David Green via cfe-commits
@@ -0,0 +1,1571 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=armv7a-- -mattr=+neon,+vfp4 %s -o - | FileCheck %s davemgreen wrote: Sorry - that was a typo and should have been `armv7a

[clang] [llvm] [CoroEarly] Infer presplitcoroutine attribute for Switch-Resumed ABI (PR #169866)

2025-11-30 Thread via cfe-commits
github-actions[bot] wrote: # :penguin: Linux x64 Test Results * 166452 tests passed * 2876 tests skipped * 2 tests failed ## Failed Tests (click on a test name to see its output) ### Clang Clang.CodeGenCoroutines/coro-always-inline.cpp ``` Exit Code: 2 Command Output (stdout): -- # RUN: at

[clang] [llvm] [AMDGPU] Apply alignment attr for make.buffer.rsrc (PR #166914)

2025-11-30 Thread Shilei Tian via cfe-commits
@@ -1661,6 +1661,10 @@ static bool runImpl(Module &M, AnalysisGetter &AG, TargetMachine &TM, if (Ptr) { A.getOrCreateAAFor(IRPosition::value(*Ptr)); A.getOrCreateAAFor(IRPosition::value(*Ptr)); +if (Instruction *I = dyn_cast(Ptr)) + if (c

[clang] [llvm] [AMDGPU] Apply alignment attr for make.buffer.rsrc (PR #166914)

2025-11-30 Thread Shilei Tian via cfe-commits
@@ -5531,7 +5538,7 @@ struct AAAlignCallSiteReturned final const auto *AlignAA = A.getAAFor(*this, IRPosition::value(*(II->getOperand(0))), DepClassTy::REQUIRED); -if (AlignAA && AlignAA->isValidState()) { +if

[clang] [llvm] [CoroEarly] Infer presplitcoroutine attribute for Switch-Resumed ABI (PR #169866)

2025-11-30 Thread Weibo He via cfe-commits
https://github.com/NewSigma converted_to_draft https://github.com/llvm/llvm-project/pull/169866 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CoroEarly] Infer presplitcoroutine attribute for Switch-Resumed ABI (PR #169866)

2025-11-30 Thread Weibo He via cfe-commits
NewSigma wrote: It is reasonable. Thanks. https://github.com/llvm/llvm-project/pull/169866 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CoroEarly] Infer presplitcoroutine attribute for Switch-Resumed ABI (PR #169866)

2025-11-30 Thread Weibo He via cfe-commits
https://github.com/NewSigma updated https://github.com/llvm/llvm-project/pull/169866 >From 0e63018ab054e467c18deb67cd647a7fbbf41e1c Mon Sep 17 00:00:00 2001 From: NewSigma Date: Fri, 28 Nov 2025 11:11:12 +0800 Subject: [PATCH 1/4] [CoroEarly] Add presplitcoroutine when frontend misses it ---

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Chuanqi Xu via cfe-commits
@@ -768,6 +779,41 @@ struct GetReturnObjectManager { CGF.EmitAutoVarInit(GroEmission); Builder.CreateStore(Builder.getTrue(), GroActiveFlag); } + + void EmitGroConv() { +// GRO conversion is unnecessary when get_return_object's type matches the +// coroutine

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Chuanqi Xu via cfe-commits
@@ -973,8 +1028,27 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) { // shouldn't change the AST. if (PreviousRetValue) cast(Ret)->setRetValue(PreviousRetValue); - } +if (!GroManager.DirectEmit) { + // Send GRO conversion to Con

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Chuanqi Xu via cfe-commits
@@ -973,8 +1028,27 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) { // shouldn't change the AST. if (PreviousRetValue) cast(Ret)->setRetValue(PreviousRetValue); - } +if (!GroManager.DirectEmit) { + // Send GRO conversion to Con

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Chuanqi Xu via cfe-commits
@@ -973,8 +1028,27 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) { // shouldn't change the AST. if (PreviousRetValue) cast(Ret)->setRetValue(PreviousRetValue); - } +if (!GroManager.DirectEmit) { + // Send GRO conversion to Con

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Chuanqi Xu via cfe-commits
@@ -973,8 +1028,27 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) { // shouldn't change the AST. if (PreviousRetValue) cast(Ret)->setRetValue(PreviousRetValue); - } +if (!GroManager.DirectEmit) { + // Send GRO conversion to Con

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Chuanqi Xu via cfe-commits
@@ -768,6 +779,41 @@ struct GetReturnObjectManager { CGF.EmitAutoVarInit(GroEmission); Builder.CreateStore(Builder.getTrue(), GroActiveFlag); } + + void EmitGroConv() { +// GRO conversion is unnecessary when get_return_object's type matches the +// coroutine

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Chuanqi Xu via cfe-commits
@@ -768,6 +779,41 @@ struct GetReturnObjectManager { CGF.EmitAutoVarInit(GroEmission); Builder.CreateStore(Builder.getTrue(), GroActiveFlag); } + + void EmitGroConv() { ChuanqiXu9 wrote: We can add comment for: 1. the intention 2. the example IR bef

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Chuanqi Xu via cfe-commits
@@ -768,6 +779,41 @@ struct GetReturnObjectManager { CGF.EmitAutoVarInit(GroEmission); Builder.CreateStore(Builder.getTrue(), GroActiveFlag); } + + void EmitGroConv() { +// GRO conversion is unnecessary when get_return_object's type matches the +// coroutine

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Chuanqi Xu via cfe-commits
@@ -768,6 +779,41 @@ struct GetReturnObjectManager { CGF.EmitAutoVarInit(GroEmission); Builder.CreateStore(Builder.getTrue(), GroActiveFlag); } + + void EmitGroConv() { +// GRO conversion is unnecessary when get_return_object's type matches the +// coroutine

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Chuanqi Xu via cfe-commits
@@ -973,8 +1028,27 @@ void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) { // shouldn't change the AST. if (PreviousRetValue) cast(Ret)->setRetValue(PreviousRetValue); - } +if (!GroManager.DirectEmit) { + // Send GRO conversion to Con

[clang] [clang-tools-extra] [clang-tidy] Fix false positive in `misc-const-correctness` (PR #170065)

2025-11-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: mitchell (zeyi2) Changes Closes https://github.com/llvm/llvm-project/issues/131599 and https://github.com/llvm/llvm-project/issues/170033 --- Full diff: https://github.com/llvm/llvm-project/pull/170065.diff 4 Files Affected:

[clang] [clang-tools-extra] [clang-tidy] Fix false positive in `misc-const-correctness` (PR #170065)

2025-11-30 Thread via cfe-commits
https://github.com/zeyi2 created https://github.com/llvm/llvm-project/pull/170065 Closes https://github.com/llvm/llvm-project/issues/131599 and https://github.com/llvm/llvm-project/issues/170033 >From 7f940f17bbdf56b116f3a7347cc8986f4075acf9 Mon Sep 17 00:00:00 2001 From: mtx Date: Sun, 30 No

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Weibo He via cfe-commits
NewSigma wrote: Thanks for the review. I agree with you that the previous implementation looks dangerous. In this revision, I managed to emit conversion part only when necessary and I believe it is a improvement. Please have a look. https://github.com/llvm/llvm-project/pull/151067

[clang] [clang][CodeGen] Promote point of GRO(CWG2563) (PR #151067)

2025-11-30 Thread Weibo He via cfe-commits
https://github.com/NewSigma updated https://github.com/llvm/llvm-project/pull/151067 >From 335a1884354b77afc4b4cdacc88956c55eb0191e Mon Sep 17 00:00:00 2001 From: NewSigma Date: Thu, 30 Oct 2025 09:15:32 +0800 Subject: [PATCH 1/3] Promote point of GRO --- clang/lib/CodeGen/CGCoroutine.cpp

[clang] [llvm] [AMDGPU] Apply alignment attr for make.buffer.rsrc (PR #166914)

2025-11-30 Thread via cfe-commits
https://github.com/Shoreshen updated https://github.com/llvm/llvm-project/pull/166914 >From 4d3d6e41cb347572b69cd84705218786a01a7b4e Mon Sep 17 00:00:00 2001 From: shore <[email protected]> Date: Fri, 7 Nov 2025 17:52:32 +0800 Subject: [PATCH 1/7] Apply alignment attr for make.buffer.rsrc --- l

[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX512 kmov intrinsics to be used in constexp (PR #169895)

2025-11-30 Thread Muhammad Abdul via cfe-commits
https://github.com/0xzre updated https://github.com/llvm/llvm-project/pull/169895 >From 8af38c0b21f6a5b6094a3ca5be6b59ec997db654 Mon Sep 17 00:00:00 2001 From: 0xzre Date: Fri, 28 Nov 2025 11:28:17 +0700 Subject: [PATCH 1/3] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin -

[clang] [llvm] Added partial support for compiling C++20 modules and header-units without scanning. (PR #147682)

2025-11-30 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: Ah, it's P2978R0. Not N2978. https://github.com/llvm/llvm-project/pull/147682 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Added partial support for compiling C++20 modules and header-units without scanning. (PR #147682)

2025-11-30 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: You keep referring to "N2978", but that's quite confusing. As far as I can tell, the draft you link to is just something you have produced, not something submitted to WG21. Were it to be submitted today, it would be N50xx. Moreover, there already is an N2978, from 2009, which is

[clang-tools-extra] [clangd] Fix dangling references to StringMap's value. (PR #169339)

2025-11-30 Thread John Porto via cfe-commits
jpporto wrote: Thanks for the pointers, truly appreciated. I am not sure what was happening on my machine (my clangd was built with a revision from a few weeks ago, so probably a broken version either). I am closing the PR for now until I can repro the issue on my side (hopefully never). Chee

[clang-tools-extra] [clangd] Fix dangling references to StringMap's value. (PR #169339)

2025-11-30 Thread John Porto via cfe-commits
https://github.com/jpporto closed https://github.com/llvm/llvm-project/pull/169339 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make __builtin_assume_dereferenceable constexpr (PR #169869)

2025-11-30 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav updated https://github.com/llvm/llvm-project/pull/169869 >From fc8d8c7cc306bc8531065260da0456a510747884 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Thu, 27 Nov 2025 19:18:31 -0800 Subject: [PATCH 1/5] [Clang] Make __builtin_assume_dereferenceable co

[clang] [llvm] [ARM] Introduce intrinsics for MVE vrnd under strict-fp. (PR #169797)

2025-11-30 Thread David Green via cfe-commits
https://github.com/davemgreen updated https://github.com/llvm/llvm-project/pull/169797 >From 63b186b830699537bc56809fa01bbc322b89696e Mon Sep 17 00:00:00 2001 From: David Green Date: Sun, 30 Nov 2025 20:59:12 + Subject: [PATCH] [ARM] Introduce intrinsics for MVE vrnd under strict-fp. Simil

[clang] [CIR] Align inline-kind FuncOp attribute with incubator (PR #170050)

2025-11-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrich Lauko (xlauko) Changes Switches to more efficient explicit enum property instead of a wrapped storage, simplifying the string representation. The attribute is now placed before the symbol name for consistency with other FuncOp att

[clang] [CIR] Align inline-kind FuncOp attribute with incubator (PR #170050)

2025-11-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Henrich Lauko (xlauko) Changes Switches to more efficient explicit enum property instead of a wrapped storage, simplifying the string representation. The attribute is now placed before the symbol name for consistency with other FuncOp a

[clang] [CIR] Align inline-kind FuncOp attribute with incubator (PR #170050)

2025-11-30 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko ready_for_review https://github.com/llvm/llvm-project/pull/170050 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Align inline-kind FuncOp attribute with incubator (PR #170050)

2025-11-30 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#170050** https://app.graphite.com/github/pr/llvm/llvm-project/170050?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.com/github/pr/llvm/llvm-project/17005

[clang] [Clang] Handle ?: operator in fold expression (PR #164019)

2025-11-30 Thread via cfe-commits
Sirraide wrote: > Could something else suppress `ExprError()`? Returning `ExprError()` isn’t the same as issuing an error; we only consider compilation to have failed if an actual error _diagnostic_ is emitted. https://github.com/llvm/llvm-project/pull/164019 __

[clang] [Clang] Handle ?: operator in fold expression (PR #164019)

2025-11-30 Thread via cfe-commits
@@ -1510,7 +1510,7 @@ static void CheckFoldOperand(Sema &S, Expr *E) { E = E->IgnoreImpCasts(); auto *OCE = dyn_cast(E); if ((OCE && OCE->isInfixBinaryOp()) || isa(E) || - isa(E)) { + isa(E) || isa(E)) { Sirraide wrote: > IIUC the frontend prod

[clang] [CIR] vTableClassNameForType: return correct VTableClass name for Type::ObjCObjectPointer, Type::Pointer (PR #163850)

2025-11-30 Thread via cfe-commits
https://github.com/n2h9 edited https://github.com/llvm/llvm-project/pull/163850 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] Add device-side kernel launch support (PR #165519)

2025-11-30 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/165519 >From 137509b3aff13a1e941c09fd460d639d28277f3e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Sat, 18 Oct 2025 19:46:39 -0400 Subject: [PATCH] [CUDA] Add device-side kernel launch support - CUDA's dynamic p

[clang-tools-extra] clangd: Extend reference search with constructor calls through forwarding (PR #169742)

2025-11-30 Thread via cfe-commits
https://github.com/timon-ul edited https://github.com/llvm/llvm-project/pull/169742 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] clangd: Extend index references with constructor calls through forwarding (PR #169742)

2025-11-30 Thread via cfe-commits
https://github.com/timon-ul edited https://github.com/llvm/llvm-project/pull/169742 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Try to infer type for `load`/`store` when replacing `memcpy` (PR #169966)

2025-11-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic requested changes to this pull request. Yes, we should not use alloca types for this purpose. The correct type to use here is the [byte type](https://blog.llvm.org/posts/2025-08-29-gsoc-byte-type/) -- this is necessary for correctness, otherwise the transform may be in

[clang-tools-extra] clangd: Extend index references with constructor calls through forwarding (PR #169742)

2025-11-30 Thread via cfe-commits
https://github.com/timon-ul ready_for_review https://github.com/llvm/llvm-project/pull/169742 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] clangd: Extend index references with constructor calls through forwarding (PR #169742)

2025-11-30 Thread via cfe-commits
https://github.com/timon-ul updated https://github.com/llvm/llvm-project/pull/169742 >From 44ebad6933fccab5bcfc866ee56dd5381da5f452 Mon Sep 17 00:00:00 2001 From: Timon Ulrich Date: Mon, 10 Nov 2025 10:40:14 +0100 Subject: [PATCH 01/10] clangd: make forwarding heuristic available for more loca

[clang] [CIR] Add SCF ResumeOp (PR #170042)

2025-11-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Add SCF Resume op to be used before the CFG flattening pass Issue https://github.com/llvm/llvm-project/issues/154992 --- Full diff: https://github.com/llvm/llvm-project/pull/1

[clang] [CIR] Add SCF ResumeOp (PR #170042)

2025-11-30 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/170042 Add SCF Resume op to be used before the CFG flattening pass Issue https://github.com/llvm/llvm-project/issues/154992 >From 50162dd8af7931ef901951d8f2958b41ecc16ad1 Mon Sep 17 00:00:00 2001 From: Amr Hesham

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-11-30 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,479 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown -target-feature +avx -target-feature +avx512f -target-feature +avx512vl -verify %s RKSimon wrote: Add -fexperimental-new-constant-interpreter test coverage as well https://github.co

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-11-30 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,479 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown -target-feature +avx -target-feature +avx512f -target-feature +avx512vl -verify %s + +#define __MM_MALLOC_H RKSimon wrote: `-ffreestanding` should allow you to avoid needing the __M

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-11-30 Thread Simon Pilgrim via cfe-commits
@@ -166,7 +166,7 @@ let Features = "sse2", Attributes = [NoThrow] in { def movnti : X86Builtin<"void(int *, int)">; } -let Features = "sse2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in { +let Features = "sse2", Attributes = [NoThrow, Const, Constexpr, Requi

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-11-30 Thread Simon Pilgrim via cfe-commits
@@ -12165,7 +12165,36 @@ static bool evalShuffleGeneric( Out = APValue(ResultElements.data(), ResultElements.size()); return true; } +static bool ConvertDoubleToFloatStrict(EvalInfo &Info, const Expr *E, RKSimon wrote: Equivalent InterpBuiltin.cpp handling

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-11-30 Thread Simon Pilgrim via cfe-commits
@@ -207,9 +207,8 @@ _mm512_undefined(void) return (__m512)__builtin_ia32_undef512(); } -static __inline__ __m512 __DEFAULT_FN_ATTRS512 -_mm512_undefined_ps(void) -{ +static __inline__ __m512 __DEFAULT_FN_ATTRS512_CONSTEXPR +_mm512_undefined_ps(void) { RKSimo

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-11-30 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,479 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown -target-feature +avx -target-feature +avx512f -target-feature +avx512vl -verify %s + RKSimon wrote: It might be better to split these into 4 files: ``` constexpr-x86-sse2-builtins.cp

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-11-30 Thread Simon Pilgrim via cfe-commits
@@ -24,12 +24,12 @@ def undef128 : X86Builtin<"_Vector<2, double>()"> { let Attributes = [Const, NoThrow, RequiredVectorWidth<128>]; } -def undef256 : X86Builtin<"_Vector<4, double>()"> { - let Attributes = [Const, NoThrow, RequiredVectorWidth<256>]; +def undef256 : X86Buil

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-11-30 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,479 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown -target-feature +avx -target-feature +avx512f -target-feature +avx512vl -verify %s + +#define __MM_MALLOC_H +#include + +namespace Test_mm_cvtsd_ss { +namespace OK { +constexpr __m128 a = { 9.0f, 5.

[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

2025-11-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon requested changes to this pull request. https://github.com/llvm/llvm-project/pull/169980 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX512 kmov intrinsics to be used in constexp (PR #169895)

2025-11-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon requested changes to this pull request. minor style comment https://github.com/llvm/llvm-project/pull/169895 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX512 kmov intrinsics to be used in constexp (PR #169895)

2025-11-30 Thread Simon Pilgrim via cfe-commits
@@ -576,6 +576,14 @@ __mmask64 test_cvtu64_mask64(__m512i A, __m512i B, unsigned long long C) { return _mm512_mask_cmpneq_epu8_mask(_cvtu64_mask64(C), A, B); } +TEST_CONSTEXPR(_cvtmask32_u32((__mmask32)0xDEADBEEF) == 0xDEADBEEF); +TEST_CONSTEXPR(_cvtu32_mask32(0x13579BDF) =

[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX512 kmov intrinsics to be used in constexp (PR #169895)

2025-11-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/169895 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new check 'readability-inconsistent-ifelse-braces' (PR #162361)

2025-11-30 Thread via cfe-commits
github-actions[bot] wrote: # :penguin: Linux x64 Test Results * 3056 tests passed * 7 tests skipped * 1 test failed ## Failed Tests (click on a test name to see its output) ### Clang Tools Clang Tools.clang-tidy/checkers/readability/inconsistent-ifelse-braces.cpp ``` Exit Code: 1 Command

[clang-tools-extra] [clang-tidy] Add new check 'readability-inconsistent-ifelse-braces' (PR #162361)

2025-11-30 Thread Davide Cunial via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/162361 >From 3c5ad1cdf7b97dee204733143282a8dac4a41b6d Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Fri, 24 Oct 2025 08:18:09 +0200 Subject: [PATCH 1/9] [clang-tidy] Add new check 'bugprone-inconsistent-if

[clang-tools-extra] [llvm] [Clangd] Add AST search capabilities from clang-query (PR #156090)

2025-11-30 Thread Tor Shepherd via cfe-commits
Fabian =?utf-8?q?Keßler?= , Fabian =?utf-8?q?Keßler?= , Fabian =?utf-8?q?Keßler?= , Fabian =?utf-8?q?Keßler?= Message-ID: In-Reply-To: torshepherd wrote: Sorry about the delay; presentations at work. If you can wait until after around December 16th, I can still draft a basic UI for this; othe

[clang-tools-extra] [clang-tidy] Add new check 'readability-inconsistent-ifelse-braces' (PR #162361)

2025-11-30 Thread Davide Cunial via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/162361 >From 3c5ad1cdf7b97dee204733143282a8dac4a41b6d Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Fri, 24 Oct 2025 08:18:09 +0200 Subject: [PATCH 1/9] [clang-tidy] Add new check 'bugprone-inconsistent-if

[clang-tools-extra] [clang-tidy] Add new check 'readability-inconsistent-ifelse-braces' (PR #162361)

2025-11-30 Thread Davide Cunial via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/162361 >From 3c5ad1cdf7b97dee204733143282a8dac4a41b6d Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Fri, 24 Oct 2025 08:18:09 +0200 Subject: [PATCH 1/9] [clang-tidy] Add new check 'bugprone-inconsistent-if

[clang-tools-extra] [clang-tidy] Add new check 'readability-inconsistent-ifelse-braces' (PR #162361)

2025-11-30 Thread Davide Cunial via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/162361 >From 3c5ad1cdf7b97dee204733143282a8dac4a41b6d Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Fri, 24 Oct 2025 08:18:09 +0200 Subject: [PATCH 1/9] [clang-tidy] Add new check 'bugprone-inconsistent-if

[clang-tools-extra] [clang-tidy] Add new check 'readability-inconsistent-ifelse-braces' (PR #162361)

2025-11-30 Thread Davide Cunial via cfe-commits
@@ -0,0 +1,122 @@ +// RUN: %check_clang_tidy -std=c++98-or-later %s bugprone-inconsistent-ifelse-braces %t capitan-davide wrote: > Please add tests with macros Added some tests with macros and update diagnostic message https://github.com/llvm/llvm-project/pull

[clang-tools-extra] [clang-tidy] Add new check 'readability-inconsistent-ifelse-braces' (PR #162361)

2025-11-30 Thread Davide Cunial via cfe-commits
https://github.com/capitan-davide edited https://github.com/llvm/llvm-project/pull/162361 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix false positive in `readability-redundant-typename` (PR #170034)

2025-11-30 Thread via cfe-commits
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/170034 >From e8bc35d273950cc6d5f1e947db1d34741de52432 Mon Sep 17 00:00:00 2001 From: mtx Date: Sun, 30 Nov 2025 20:54:12 +0800 Subject: [PATCH 1/2] [clang-tidy] Fix false positive in readability-redundant-typename ---

[clang] [llvm] [ARM] Introduce intrinsics for MVE fma under strict-fp. (PR #169771)

2025-11-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-test-suite` running on `ppc64le-clang-test-suite` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/build

[clang] [llvm] [ARM] Introduce intrinsics for MVE fma under strict-fp. (PR #169771)

2025-11-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-lnt` running on `systemz-1` while building `clang,llvm` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/136/builds/6132 Here is the relevant piece of the b

[clang-tools-extra] [clang-tidy] Fix false positive in `readability-redundant-typename` (PR #170034)

2025-11-30 Thread Yanzuo Liu via cfe-commits
zwuis wrote: This feature is not released. Release note is not needed. https://github.com/llvm/llvm-project/pull/170034 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/li

[clang-tools-extra] [clang-tidy] Add new check 'bugprone-inconsistent-ifelse-braces' (PR #162361)

2025-11-30 Thread Davide Cunial via cfe-commits
https://github.com/capitan-davide deleted https://github.com/llvm/llvm-project/pull/162361 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add hasAdjSubstatements matcher (PR #169965)

2025-11-30 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar requested changes to this pull request. https://github.com/llvm/llvm-project/pull/169965 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add hasAdjSubstatements matcher (PR #169965)

2025-11-30 Thread Jakub Kuderski via cfe-commits
@@ -1778,6 +1778,12 @@ OutputIt copy_if(R &&Range, OutputIt Out, UnaryPredicate P) { return std::copy_if(adl_begin(Range), adl_end(Range), Out, P); } +template +auto search(R1 &&Range1, R2 &&Range2, BinaryPredicate P) { + return std::search(adl_begin(Range1), adl_end(Rang

[clang] [llvm] [ARM] Introduce intrinsics for MVE fma under strict-fp. (PR #169771)

2025-11-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux` running on `systemz-1` while building `clang,llvm` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/42/builds/7179 Here is the relevant piece of the build

[clang] [Clang] Handle ?: operator in fold expression (PR #164019)

2025-11-30 Thread Azmat Yusuf via cfe-commits
azmat-y wrote: > I’m not convinced this is the right approach; what if we have e.g. > > ```c++ > template > void foo(T... Params) { > ([&]{ Params ?: 1; }(), ...); > } > ``` > > We still crash on this and I’m sure `commonExpr` would still be > pack-dependent in this case, but we don’t want

[clang] [Clang] Handle ?: operator in fold expression (PR #164019)

2025-11-30 Thread Azmat Yusuf via cfe-commits
@@ -1510,7 +1510,7 @@ static void CheckFoldOperand(Sema &S, Expr *E) { E = E->IgnoreImpCasts(); auto *OCE = dyn_cast(E); if ((OCE && OCE->isInfixBinaryOp()) || isa(E) || - isa(E)) { + isa(E) || isa(E)) { azmat-y wrote: IIUC the frontend produce

[clang-tools-extra] [clang-tidy] Fix false positive in `readability-redundant-typename` (PR #170034)

2025-11-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: mitchell (zeyi2) Changes Closes #169166 --- Full diff: https://github.com/llvm/llvm-project/pull/170034.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/RedundantTypenameCheck.cpp (+4-2) - (modified) c

[clang-tools-extra] [clang-tidy] Fix false positive in `readability-redundant-typename` (PR #170034)

2025-11-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: mitchell (zeyi2) Changes Closes #169166 --- Full diff: https://github.com/llvm/llvm-project/pull/170034.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/RedundantTypenameCheck.cpp (+4-2) - (modi

[clang-tools-extra] [clang-tidy] Fix false positive in `readability-redundant-typename` (PR #170034)

2025-11-30 Thread via cfe-commits
https://github.com/zeyi2 created https://github.com/llvm/llvm-project/pull/170034 Closes #169166 >From e8bc35d273950cc6d5f1e947db1d34741de52432 Mon Sep 17 00:00:00 2001 From: mtx Date: Sun, 30 Nov 2025 20:54:12 +0800 Subject: [PATCH] [clang-tidy] Fix false positive in readability-redundant-ty

[clang] [Clang] Handle ?: operator in fold expression (PR #164019)

2025-11-30 Thread Azmat Yusuf via cfe-commits
@@ -12,3 +12,8 @@ template struct A { foo((... + static_cast(1))); // expected-error {{expression contains unexpanded parameter pack 'T'}} } }; + +template +void foo(T... Params) { + (Params ?: 1, ...); // expected-error {{expression not permitted as operand of fold

[clang] [CIR][X86] Add support for kunpck builtins (PR #168757)

2025-11-30 Thread Ahmed Nour via cfe-commits
https://github.com/ahmednoursphinx updated https://github.com/llvm/llvm-project/pull/168757 >From 2f02de39803ff7ebde3e52ac60dabbb3d062515c Mon Sep 17 00:00:00 2001 From: ahmed Date: Wed, 19 Nov 2025 12:46:29 +0200 Subject: [PATCH 01/23] feat: Add support for kunpack builtins --- clang/lib/CIR

[clang] [CIR] Upstream SizeOf for VariableArrayType (PR #169993)

2025-11-30 Thread Amr Hesham via cfe-commits
@@ -2344,25 +2344,29 @@ mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( } else { // C99 6.5.3.4p2: If the argument is an expression of type // VLA, it is evaluated. - cgf.getCIRGenModule().errorNYI( - e->getSource

[clang] [llvm] [ARM] Introduce intrinsics for MVE vrnd under strict-fp. (PR #169797)

2025-11-30 Thread via cfe-commits
github-actions[bot] wrote: # :penguin: Linux x64 Test Results * 166454 tests passed * 2872 tests skipped * 1 test failed ## Failed Tests (click on a test name to see its output) ### LLVM LLVM.CodeGen/Thumb2/mve-intrinsics/strict-intrinsics.ll ``` Exit Code: 2 Command Output (stdout): -- #

  1   2   >