[clang] [llvm] [PowerPC] Add Support for BCDSHIFT, BCDSHIFTR, BCDTRUNC, BCDUTRUNC, and BCDUSHIFT instruction support (PR #154715)

2025-09-22 Thread Aditi Medhane via cfe-commits
@@ -582,6 +582,11 @@ TARGET_BUILTIN(__builtin_ppc_bcdsub_p, "iiV16UcV16Uc", "", // P9 Binary-coded decimal (BCD) builtins. TARGET_BUILTIN(__builtin_ppc_bcdcopysign, "V16UcV16UcV16Uc", "", "power9-vector") TARGET_BUILTIN(__builti

[clang] [llvm] [RISCV] Add MC layer support for Andes XAndesVSIntH extension. (PR #159514)

2025-09-22 Thread Jim Lin via cfe-commits
https://github.com/tclin914 closed https://github.com/llvm/llvm-project/pull/159514 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Tooling] Simplify a use of std::is_same (NFC) (PR #160237)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes std::is_same<...>::type is the same as std::is_same<...>. This patch removes the redundant ::type at the end. --- Full diff: https://github.com/llvm/llvm-project/pull/160237.diff 1 Files Affected:

[clang] [Tooling] Simplify a use of std::is_same (NFC) (PR #160237)

2025-09-22 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/160237 std::is_same<...>::type is the same as std::is_same<...>. This patch removes the redundant ::type at the end. >From 0e51d048184bd92ad825bd78ea6023a753398417 Mon Sep 17 00:00:00 2001 From: Kazu Hirata D

[clang] [clang] NFC: add a few template template parameter test cases (PR #160230)

2025-09-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/160230 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 15f05dc - [clang] NFC: add a few template template parameter test cases (#160230)

2025-09-22 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-09-23T05:30:09Z New Revision: 15f05dc135049ad125f19604508a51b50402f9d4 URL: https://github.com/llvm/llvm-project/commit/15f05dc135049ad125f19604508a51b50402f9d4 DIFF: https://github.com/llvm/llvm-project/commit/15f05dc135049ad125f19604508a51b50402f9d4.diff LO

[clang] [llvm] [RISCV] Add MC layer support for Andes XAndesVSIntH extension. (PR #159514)

2025-09-22 Thread via cfe-commits
https://github.com/Ruhung updated https://github.com/llvm/llvm-project/pull/159514 >From 7503b1356f3fbc2e0679bfa5376fdde499721c90 Mon Sep 17 00:00:00 2001 From: Juhung Li Date: Tue, 16 Sep 2025 13:36:08 +0800 Subject: [PATCH] [RISCV] Add MC layer support for Andes XAndesVSIntH extension. ---

[clang] [Clang] Add diagnostic for why std::is_abstract is false (PR #156199)

2025-09-22 Thread Shafik Yaghmour via cfe-commits
@@ -964,3 +964,79 @@ namespace is_aggregate { static_assert(__is_aggregate(S7[10])); } + +namespace is_abstract_tests { +struct Abstract1 { + virtual void fn1() = 0; +}; + +struct Abstract2 { + virtual void fn2() = 0; +}; + +struct NonAbstract +{ + virtual void f() {} +

[clang] [Clang] Add diagnostic for why std::is_abstract is false (PR #156199)

2025-09-22 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Can we add a more detailed summary, at least outlines the various cases you seek to cover e.g. ref, array, union etc https://github.com/llvm/llvm-project/pull/156199 ___ cfe-commits mailing list [email protected]

[clang] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add AVX512 VPTERNLOGD/VPTERNLOGQ intrinsics to be used in constexpr (PR #158703)

2025-09-22 Thread via cfe-commits
@@ -6246,40 +6246,191 @@ __m512i test_mm512_ternarylogic_epi32(__m512i __A, __m512i __B, __m512i __C) { // CHECK: @llvm.x86.avx512.pternlog.d.512({{.*}}, i32 240) return _mm512_ternarylogic_epi32(__A, __B, __C, _MM_TERNLOG_A); } +TEST_CONSTEXPR(match_v16si( + _mm512_terna

[clang] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add AVX512 VPTERNLOGD/VPTERNLOGQ intrinsics to be used in constexpr (PR #158703)

2025-09-22 Thread via cfe-commits
https://github.com/kimsh02 updated https://github.com/llvm/llvm-project/pull/158703 >From 1b81bf79bc7e6a2c1df846b27e4a95cf1cb97090 Mon Sep 17 00:00:00 2001 From: kimsh02 Date: Mon, 15 Sep 2025 10:58:34 -0700 Subject: [PATCH 01/11] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin -

[clang] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add AVX512 VPTERNLOGD/VPTERNLOGQ intrinsics to be used in constexpr (PR #158703)

2025-09-22 Thread via cfe-commits
https://github.com/kimsh02 edited https://github.com/llvm/llvm-project/pull/158703 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Add module map describing compiled module to file dependencies. (PR #160226)

2025-09-22 Thread Volodymyr Sapsai via cfe-commits
@@ -46,7 +46,8 @@ // CHECK:"file-deps": [ // CHECK-NEXT: "[[PREFIX]]/modules-fmodule-name-no-module-built.m", // CHECK-NEXT: "[[PREFIX]]/Inputs/header3.h", -// CHECK-NEXT: "[[PREFIX]]/Inputs/header.h" +// CHECK-NEXT: "[[PREFIX]]/Input

[clang] [clang][deps] Add module map describing compiled module to file dependencies. (PR #160226)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Volodymyr Sapsai (vsapsai) Changes When we add the module map describing the compiled module to the command line, add it to the file dependencies as well. Discovered while working on reproducers where a command line input was missing in

[clang] [clang][deps] Add module map describing compiled module to file dependencies. (PR #160226)

2025-09-22 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/160226 When we add the module map describing the compiled module to the command line, add it to the file dependencies as well. Discovered while working on reproducers where a command line input was missing in the cap

[clang] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add AVX512 VPTERNLOGD/VPTERNLOGQ intrinsics to be used in constexpr (PR #158703)

2025-09-22 Thread via cfe-commits
https://github.com/kimsh02 converted_to_draft https://github.com/llvm/llvm-project/pull/158703 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-22 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia updated https://github.com/llvm/llvm-project/pull/153049 >From c562d407468236c0ee31cd32949e7f6a363a798f Mon Sep 17 00:00:00 2001 From: Wael Yehia Date: Tue, 9 Sep 2025 19:27:03 + Subject: [PATCH 1/9] accept ifunc attribute on AIX --- clang/include/clang/Basic/Ta

[clang] [NFC] [FlowSensitive] `LatticeJoinEffect` -> `LatticeEffect` (PR #160222)

2025-09-22 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/160222 `LatticeJoinEffect` is deprecated. >From cded6507f5e101f3eadcf790d0dbdcde14602f47 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Mon, 22 Sep 2025 19:53:13 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 approved this pull request. Approved here, though we might want another MLIR reviewer https://github.com/llvm/llvm-project/pull/159702 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/ma

[clang] [NFC] [FlowSensitive] add comment (PR #160223)

2025-09-22 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/160223 This will make it easier to understand what the function does without needing to read the code. >From 6ce762f55a02edec8cd3daf3a7c93da6240dc243 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Mon, 22 Sep 2025

[clang] [Clang][FIX] Fix type qualifiers on vector builtins (PR #160185)

2025-09-22 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/160185 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [FlowSensitive] add comment (PR #160223)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Florian Mayer (fmayer) Changes This will make it easier to understand what the function does without needing to read the code. --- Full diff: https://github.com/llvm/llvm-project/pull/160223.diff 1 Files Affected: - (modified)

[clang] [clang] Fix crash with -lstdc++ in -ccc-print-phases (PR #160047)

2025-09-22 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: This needs summary text, in particular a bit more of explanation of the problem and why these changes fixes it. https://github.com/llvm/llvm-project/pull/160047 ___ cfe-commits mailing list [email protected]

[clang] [llvm] [clang][SPARC] Pass 16-aligned structs with the correct alignment in CC (PR #155829)

2025-09-22 Thread via cfe-commits
@@ -215,6 +259,17 @@ int f_variable(char *f, ...) { case 'm': s += *va_arg(ap, struct medium).a; break; + +// CHECK: %[[CUR:[^ ]+]] = load ptr, ptr %ap +// CHECK-DAG: %[[NXT:[^ ]+]] = getelementptr inbounds i8, ptr %[[CUR]], i64 8 +// CHECK-DAG: store ptr %[[NXT]], pt

[clang] [NFC] [FlowSensitive] `LatticeJoinEffect` -> `LatticeEffect` (PR #160222)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Florian Mayer (fmayer) Changes `LatticeJoinEffect` is deprecated. --- Full diff: https://github.com/llvm/llvm-project/pull/160222.diff 2 Files Affected: - (modified) clang/include/clang/Analysis/FlowSensitive/CachedConstAccessorsLatti

[clang] [NFC] [FlowSensitive] `LatticeJoinEffect` -> `LatticeEffect` (PR #160222)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Florian Mayer (fmayer) Changes `LatticeJoinEffect` is deprecated. --- Full diff: https://github.com/llvm/llvm-project/pull/160222.diff 2 Files Affected: - (modified) clang/include/clang/Analysis/FlowSensitive/CachedConstAcces

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-22 Thread via cfe-commits
Sirraide wrote: > These actually produce the `-Wdouble-promotion` warning too while they > probably shouldn't. While that is the case, I’d argue that *hopefully* no-one is using a compound literal for *`double`*. Interestingly, from looking at the AST, the fix for that, if we cared to fix tha

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-22 Thread via cfe-commits
https://github.com/Sirraide commented: I’ve thought about this for a bit, and this approach seems fine to me https://github.com/llvm/llvm-project/pull/159992 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-22 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/159992 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Shilei Tian via cfe-commits
shiltian wrote: > Approved here, though we might want another MLIR reviewer Feel free to add one if you like. https://github.com/llvm/llvm-project/pull/159702 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailm

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-22 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-22 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang-tools-extra] [clang-tidy] Add modernize-make-direct check (PR #118120)

2025-09-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/118120 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,40 @@ +//===--===// +// +// 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: Apac

[clang] [CIR] Implement Unary real & imag on scalar expr (PR #159916)

2025-09-22 Thread Andy Kaylor via cfe-commits
@@ -1001,3 +1001,86 @@ void foo36() { // OGCG: %[[A_IMAG_F32:.*]] = fpext half %[[A_IMAG]] to float // OGCG: %[[A_IMAG_F16:.*]] = fptrunc float %[[A_IMAG_F32]] to half // OGCG: store half %[[A_IMAG_F16]], ptr %[[IMAG_ADDR]], align 2 + +void foo38() { + float a; + float b = __

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-22 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,34 @@ +//===--===// +// +// 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: Apac

[clang] [CIR] Implement static lambda invoker (PR #160137)

2025-09-22 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM (lambas will be a cool one to raise at some point) https://github.com/llvm/llvm-project/pull/160137 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin

[clang] [NFC][Clang][OpenMP] Add helper functions/utils for finding/comparing attach base-ptrs. (PR #155625)

2025-09-22 Thread Abhinav Gaba via cfe-commits
https://github.com/abhinavgaba updated https://github.com/llvm/llvm-project/pull/155625 >From 8256e93c46ddd4e0fdd4125b769f040741e56890 Mon Sep 17 00:00:00 2001 From: Abhinav Gaba Date: Wed, 27 Aug 2025 07:02:36 -0700 Subject: [PATCH 1/7] [NFC][Clang] Add helper functions/utils for finding/comp

[clang] [Clang][FIX] Fix type qualifiers on vector builtins (PR #160185)

2025-09-22 Thread John McCall via cfe-commits
@@ -2428,6 +2435,11 @@ static ExprResult BuiltinMaskedScatter(Sema &S, CallExpr *TheCall) { QualType PtrTy = PtrArg->getType(); QualType PointeeTy = PtrTy->getPointeeType(); + if (PtrTy->getPointeeType().isConstQualified()) +return ExprError( +S.Diag(PtrArg->

[clang] [llvm] [Clang] Rewrite tests using subshells to set env variables (PR #158446)

2025-09-22 Thread Aiden Grossman via cfe-commits
@@ -1,13 +1,14 @@ // Some assertions in this test use Linux style (/) file paths. // UNSUPPORTED: system-windows +// RUN: bash -c env | grep LD_LIBRARY_PATH | tr -d '\n' > /tmp/ld_library_path boomanaiden154 wrote: 4efbbe1d35fe2666225b2989ea80d3af4d827f84 http

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
@@ -11602,29 +11602,56 @@ SDValue SITargetLowering::lowerPointerAsRsrcIntrin(SDNode *Op, SDValue NumRecords = Op->getOperand(3); SDValue Flags = Op->getOperand(4); - auto [LowHalf, HighHalf] = DAG.SplitScalar(Pointer, Loc, MVT::i32, MVT::i32); - SDValue Mask = DAG.getCo

[clang] [Clang][FIX] Fix type qualifiers on vector builtins (PR #160185)

2025-09-22 Thread Joseph Huber via cfe-commits
@@ -2428,6 +2435,11 @@ static ExprResult BuiltinMaskedScatter(Sema &S, CallExpr *TheCall) { QualType PtrTy = PtrArg->getType(); QualType PointeeTy = PtrTy->getPointeeType(); + if (PtrTy->getPointeeType().isConstQualified()) +return ExprError( +S.Diag(PtrArg->

[clang] [Headers][X86] Allow SSE2/AVX2/AVX512F/AVX512BW/AVX512DQ integer arithmetic intrinsics to be used in constexpr (PR #157582)

2025-09-22 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/16342 Here is the relevant piece of the build log f

[clang] [llvm] [SemaHLSL] Correct descriptor range overflow validation (PR #159475)

2025-09-22 Thread Tex Riddell via cfe-commits
https://github.com/tex3d approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/159475 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream LValue Unary Inc & Dec for ComplexType (PR #160201)

2025-09-22 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/160201 Upstream LValue Unary Inc & Dec for ComplexType Issue: https://github.com/llvm/llvm-project/issues/141365 >From 9523916293a5cce298b04c19a18216d88947c3a8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: M

[clang] Reapply "[Clang][CMake] Use IRPGO instead of FE PGO for Cmake Caches … (PR #160133)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aiden Grossman (boomanaiden154) Changes …(#155957)" This reverts commit 8ed489914e5bdfe65e1c8fdeec335f21cd7b33a1. This reapplies the original patch now that the issue in ControlHeightReduction (#159621) has been fixed in #159686. --- Fu

[clang] Reapply "[Clang][CMake] Use IRPGO instead of FE PGO for Cmake Caches … (PR #160133)

2025-09-22 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 closed https://github.com/llvm/llvm-project/pull/160133 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [modules][test] Use -fmodules-cache-path= in test (PR #160179)

2025-09-22 Thread Pranav Kant via cfe-commits
https://github.com/pranavk closed https://github.com/llvm/llvm-project/pull/160179 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][FIX] Fix type qualifiers on vector builtins (PR #160185)

2025-09-22 Thread Joseph Huber via cfe-commits
@@ -64,3 +64,15 @@ void test_masked_scatter(int *p, v8i idx, v8b mask, v2b mask2, v8i val) { __builtin_masked_scatter(mask, idx, val, idx); // expected-error {{3rd argument must be a scalar pointer}} __builtin_masked_scatter(mask, idx, val, &idx); // expected-error {{3rd

[clang-tools-extra] [clang-tidy] Fix `modernize-use-nullptr` crash on 32-bit Windows (PR #160023)

2025-09-22 Thread Victor Chernyakin via cfe-commits
localspook wrote: Ah, no worries then! https://github.com/llvm/llvm-project/pull/160023 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-09-22 Thread Alexey Bataev via cfe-commits
@@ -15716,6 +15987,485 @@ StmtResult SemaOpenMP::ActOnOpenMPInterchangeDirective( buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPFuseDirective(ArrayRef Clauses, +

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-09-22 Thread Alexey Bataev via cfe-commits
@@ -14433,29 +14465,268 @@ bool SemaOpenMP::checkTransformableLoopNest( OriginalInits.emplace_back(); return false; }, - [&OriginalInits](OMPLoopBasedDirective *Transform) { -Stmt *DependentPreInits; -if (auto *Dir = dyn_cast(Transform

[clang] [llvm] [RISCV] Add MC layer support for Andes XAndesVSIntH extension. (PR #159514)

2025-09-22 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/159514 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add support for the HLSL matrix type (PR #159446)

2025-09-22 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/159446 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add support for the HLSL matrix type (PR #159446)

2025-09-22 Thread Farzon Lotfi via cfe-commits
@@ -243,6 +243,7 @@ ENUM_LANGOPT(HLSLVersion, HLSLLangStd, 16, HLSL_Unset, NotCompatible, "HLSL Vers LANGOPT(HLSLStrictAvailability, 1, 0, NotCompatible, "Strict availability diagnostic mode for HLSL built-in functions.") LANGOPT(HLSLSpvUseUnknownImageFormat, 1, 0, Not

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Yes, I think that is what I preferred too. https://github.com/llvm/llvm-project/pull/159671 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: (FWIW I think this https://github.com/llvm/llvm-project/pull/160188 might be a better solution.) https://github.com/llvm/llvm-project/pull/159671 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bi

[clang] [clang-tools-extra] [clang][nfc] Define ConstRecursiveASTVisitor twin of RecursiveASTVisitor (PR #160065)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Arseniy Zaostrovnykh (necto) Changes Downstream whenever we reach out for a RecursiveASTVisitor we always have to add a few const_casts to shoe it in. This NFC patch introduces a const version of the same CRTP class. To reduce code duplic

[clang-tools-extra] [clang-doc] concatenate SymbolIDs to truncated mangled names (PR #159490)

2025-09-22 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/159490 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] concatenate SymbolIDs to truncated mangled names (PR #159490)

2025-09-22 Thread Paul Kirth via cfe-commits
@@ -780,12 +780,10 @@ static void populateSymbolInfo(SymbolInfo &I, const T *D, const FullComment *C, MangledStream << D->getNameAsString(); // A 250 length limit was chosen since 255 is a common limit across // different filesystems, with a 5 character buffer for file

[clang] [llvm] [llvm] Lift VFS from `PGOOptions` to `PassBuilder` (PR #160188)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-clang-codegen Author: Jan Svoboda (jansvoboda11) Changes Some LLVM passes need access to the filesystem to read configuration files and similar. In some places, this is achieved by grabbing the VFS from `PGOOptions`

[clang] [llvm] [llvm] Lift VFS from `PGOOptions` to `PassBuilder` (PR #160188)

2025-09-22 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/160188 Some LLVM passes need access to the filesystem to read configuration files and similar. In some places, this is achieved by grabbing the VFS from `PGOOptions`, but some passes don't have access to these an

[clang] [clang][analyzer] Support strlen with offset to string literal in CStringChecker (PR #159795)

2025-09-22 Thread Donát Nagy via cfe-commits
@@ -235,6 +242,19 @@ void testStrlenCallee(void) { clang_analyzer_eval(lenBefore == lenAfter); // expected-warning{{UNKNOWN}} } +void strlen_symbolic_offset(unsigned x) { + const char *str = "abcd"; + if (x > 3) +return; + // FIXME: these should be known -

[clang] [clang][analyzer] Support strlen with offset to string literal in CStringChecker (PR #159795)

2025-09-22 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Great commit, LGTM overall! I found only one very minor issue in the tests. https://github.com/llvm/llvm-project/pull/159795 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
https://github.com/jjmarr-amd updated https://github.com/llvm/llvm-project/pull/160150 >From 35df1c6ea3af8dbaea2d7049ae79b14ce39f0774 Mon Sep 17 00:00:00 2001 From: JJ Marr Date: Fri, 11 Jul 2025 14:40:57 -0400 Subject: [PATCH 01/11] Bugprone-default-lambda-capture on-behalf-of: @AMD --- ...

[clang] [clang][bytecode] Fix unknown size arrays crash in clang bytecode (PR #160015)

2025-09-22 Thread Timm Baeder via cfe-commits
tbaederr wrote: The description of this issue should say "Fixes #153948" at the end so it gets properly closed. https://github.com/llvm/llvm-project/pull/160015 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mai

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/143230 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread JJ Marr via cfe-commits
https://github.com/jjmarr-amd edited https://github.com/llvm/llvm-project/pull/160150 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/160150 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang]: prevent assertion on empty filename arg in __has_embed (PR #159928)

2025-09-22 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk closed https://github.com/llvm/llvm-project/pull/159928 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Yes, this only kicks in when Clang gets invoked with the `-fthinlto-index=` argument, but it doesn't affect how that particular file gets loaded. It only affects the files passed via `PGOOptions`, like `-fprofile-instrument-use-path=` and `-fprofile-sample-use=`. So I think

[clang] [clang] Load `-fms-secure-hotpatch-functions-file=` through the VFS (PR #160146)

2025-09-22 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/160146 This PR uses the correctly-configured VFS to load the file specified via `-fms-secure-hotpatch-functions-file=`, matching other input files of the compiler. >From 46cb594a30ec768a230109da4656259ffe4d85c6

[clang-tools-extra] [clang-tidy][NFC] http -> https (PR #160128)

2025-09-22 Thread Victor Chernyakin via cfe-commits
@@ -43,7 +43,7 @@ static bool isValidDatePattern(StringRef Pattern) { // Checks if the string pattern used as a date format specifier contains // any incorrect pattern and reports it as a warning. -// See: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patter

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-22 Thread NohHyeon Kwon via cfe-commits
https://github.com/swote-git updated https://github.com/llvm/llvm-project/pull/155570 >From 36f751e7b92d8907bfe60f3c28748519578097c3 Mon Sep 17 00:00:00 2001 From: swote Date: Wed, 27 Aug 2025 16:34:13 +0900 Subject: [PATCH 1/5] [clang][test] Add tests for comma operator rejection in preproces

[clang] [clang] Move `-fprofile-instrument-use-path=` check to driver (PR #159667)

2025-09-22 Thread Ben Langmuir via cfe-commits
@@ -485,20 +486,48 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, } if (ProfileUseArg) { +SmallString<128> Path; benlangmuir wrote: Nit: I suggest something like `PathBuf` or `PathStorage` so we don't mix this up with the

[clang] [llvm] [HLSL] Mark `GroupMemoryBarrierWithGroupSync` as `convergent` (PR #160175)

2025-09-22 Thread Deric C. via cfe-commits
https://github.com/Icohedron approved this pull request. https://github.com/llvm/llvm-project/pull/160175 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Mark `GroupMemoryBarrierWithGroupSync` as `convergent` (PR #160175)

2025-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Finn Plummer (inbelic) Changes `GroupMemoryBarrierWithGroupSync` is required to be marked as convergent so that it can't generate duplicate calls or be moved to identical control flow. Without it, we generate undefined behaviour during opt

[clang] [llvm] [HLSL] Mark `GroupMemoryBarrierWithGroupSync` as `convergent` (PR #160175)

2025-09-22 Thread Finn Plummer via cfe-commits
https://github.com/inbelic ready_for_review https://github.com/llvm/llvm-project/pull/160175 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move `-fprofile-instrument-use-path=` check to driver (PR #159667)

2025-09-22 Thread Ben Langmuir via cfe-commits
@@ -485,20 +486,48 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, } if (ProfileUseArg) { +SmallString<128> Path; +StringRef UsePath; if (ProfileUseArg->getOption().matches(options::OPT_fprofile_instr_use_EQ)) - CmdArgs.push_ba

[clang] [llvm] [HLSL] Mark `GroupMemoryBarrierWithGroupSync` as `convergent` (PR #160175)

2025-09-22 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/160175 `GroupMemoryBarrierWithGroupSync` is required to be marked as convergent so that it can't generate duplicate calls or be moved to identical control flow. Without it, we generate undefined behaviour during optim

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
@@ -11602,29 +11602,56 @@ SDValue SITargetLowering::lowerPointerAsRsrcIntrin(SDNode *Op, SDValue NumRecords = Op->getOperand(3); SDValue Flags = Op->getOperand(4); - auto [LowHalf, HighHalf] = DAG.SplitScalar(Pointer, Loc, MVT::i32, MVT::i32); - SDValue Mask = DAG.getCo

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 commented: Minor questions about the final IR, otherwise lgtm here https://github.com/llvm/llvm-project/pull/159702 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
@@ -5905,33 +5905,46 @@ bool AMDGPULegalizerInfo::legalizePointerAsRsrcIntrin( Register Flags = MI.getOperand(5).getReg(); LLT S32 = LLT::scalar(32); + LLT S64 = LLT::scalar(64); B.setInsertPt(B.getMBB(), ++B.getInsertPt()); - auto Unmerge = B.buildUnmerge(S32, Poin

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
@@ -5905,33 +5905,46 @@ bool AMDGPULegalizerInfo::legalizePointerAsRsrcIntrin( Register Flags = MI.getOperand(5).getReg(); LLT S32 = LLT::scalar(32); + LLT S64 = LLT::scalar(64); B.setInsertPt(B.getMBB(), ++B.getInsertPt()); - auto Unmerge = B.buildUnmerge(S32, Poin

[clang] [llvm] [mlir] [AMDGPU] Add the support for 45-bit buffer resource (PR #159702)

2025-09-22 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 edited https://github.com/llvm/llvm-project/pull/159702 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] http -> https (PR #160128)

2025-09-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook closed https://github.com/llvm/llvm-project/pull/160128 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157306 >From 4ab549990f3dc3f59a6346b32687e5ecbd495586 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 22:54:31 +0300 Subject: [PATCH] [clang-tidy] Remove 'clang-analyzer-*' checks from default che

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -30,6 +30,45 @@ EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT, _Unwind_Personality_Fn); #endif +#if __has_feature(ptrauth_qualifier) +#include +#if __has_feature(ptrauth_restricted_intptr_qualif

[clang] [llvm] [llvm][clang] Propagate VFS through LTO to `PGOOptions` (PR #159671)

2025-09-22 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: It is important that gets mentioned because this doesn't affect LTO builds that triggered by linker. The `-fthinlto-index` is only used by distributed builds like Bazel for distributed thinLTO so it is important to mention what changed. You can totally construct a test c

[clang-tools-extra] [clang-tidy][NFC] http -> https (PR #160128)

2025-09-22 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/160128 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add readability-redundant-parentheses (PR #159911)

2025-09-22 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %check_clang_tidy %s readability-redundant-parentheses %t carlosgalvezp wrote: I think this check should not specify any default since it just requires "CplusPlus", and instead we should downgrade check_clang_tidy to c++98-or-later. ht

[clang-tools-extra] [clang-tidy] Add bugprone-default-lambda-capture (PR #160150)

2025-09-22 Thread via cfe-commits
@@ -203,6 +203,15 @@ New checks Finds virtual function overrides with different visibility than the function in the base class. +- New :doc:`bugprone-default-lambda-capture EugeneZelenko wrote: Please keep alphabetical order (by check name) in this sectio

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -30,6 +30,51 @@ EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT, _Unwind_Personality_Fn); #endif +#if __has_feature(ptrauth_calls) kovdan01 wrote: As discussed previously, let's u

[clang] [clang][test] Add test for comma operator rejection in preprocessor conditionals (PR #155570)

2025-09-22 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > @shafik was https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#3017 > resolved ? No, it is still active. It looks like [CWG1436](https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1436) is where the action will be moving forward. https://github.com/llvm/ll

[clang] [Clang] Support includes translated to module imports in -header-include-filtering=direct-per-file (PR #156756)

2025-09-22 Thread Sina Mahdavi via cfe-commits
https://github.com/sina-mahdavi updated https://github.com/llvm/llvm-project/pull/156756 >From 8ab5647fc5c51b42bb67ca46a063fa9815ea46f4 Mon Sep 17 00:00:00 2001 From: Sina Mahdavi Date: Wed, 3 Sep 2025 14:17:27 -0700 Subject: [PATCH 1/6] [Clang] Support includes translated to module imports in

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -377,13 +391,31 @@ const char *CFI_Parser::parseCIE(A &addressSpace, pint_t cie, case 'z': cieInfo->fdesHaveAugmentationData = true; break; - case 'P': + case 'P': { cieInfo->personalityEncoding = addressSpace.get8(p); ++p;

[clang] [Headers][X86] Allow basic AVX512 predicate ops to be used in constexpr (PR #159998)

2025-09-22 Thread via cfe-commits
https://github.com/fennecJ updated https://github.com/llvm/llvm-project/pull/159998 >From 7b91ea75b304a0b0fb3f14945b5c2f21f035bffe Mon Sep 17 00:00:00 2001 From: fennecJ Date: Mon, 22 Sep 2025 02:40:44 +0800 Subject: [PATCH 1/8] Allow kand* to be used in constexpr --- clang/include/clang/Basi

[clang] [Headers][X86] Allow SSE2/AVX2/AVX512F/AVX512BW/AVX512DQ integer arithmetic intrinsics to be used in constexpr (PR #157582)

2025-09-22 Thread via cfe-commits
donneypr wrote: @RKSimon This made my week! Thank you for your support and guidance. https://github.com/llvm/llvm-project/pull/157582 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -47,10 +47,10 @@ struct _LIBCXXABI_HIDDEN __cxa_exception { // In Wasm, a destructor returns its argument void *(_LIBCXXABI_DTOR_FUNC *exceptionDestructor)(void *); #else -void (_LIBCXXABI_DTOR_FUNC *exceptionDestructor)(void *); +void(_LIBCXXABI_DTOR_FUNC* _

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-22 Thread Daniil Kovalev via cfe-commits
@@ -1047,18 +1051,26 @@ class UnwindCursor : public AbstractUnwindCursor{ bool getInfoFromFdeCie(const typename CFI_Parser::FDE_Info &fdeInfo, const typename CFI_Parser::CIE_Info &cieInfo, pint_t pc, uintptr_t dso_base); - bo

  1   2   3   4   >