[clang] [C++20] [Modules] Fix may-be incorrect ADL for module local entities (PR #123931)

2025-01-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/123931 Close https://github.com/llvm/llvm-project/issues/123815 See the comments for details >From 17ca1bba5b7ff23abaf3694e19ee63df9f85069a Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 22 Jan 2025 11:41:55

[clang] [C++20] [Modules] Fix may-be incorrect ADL for module local entities (PR #123931)

2025-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes Close https://github.com/llvm/llvm-project/issues/123815 See the comments for details --- Full diff: https://github.com/llvm/llvm-project/pull/123931.diff 2 Files Affected: - (modified) clang/lib

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/123648 >From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Mon, 20 Jan 2025 09:03:25 -0800 Subject: [PATCH 1/6] [C++20][Modules] Fix crash/compiler error due broken AS

[clang] [Clang] Implement CWG 2628 "Implicit deduction guides should propagate constraints" (PR #111143)

2025-01-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/43 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG 2628 "Implicit deduction guides should propagate constraints" (PR #111143)

2025-01-22 Thread Younan Zhang via cfe-commits
@@ -445,10 +449,46 @@ struct ConvertConstructorToDeductionGuideTransform { return nullptr; TypeSourceInfo *NewTInfo = TLB.getTypeSourceInfo(SemaRef.Context, NewType); +// At this point, the function parameters are already 'instantiated' in the zy

[libclc] [libclc] Move several integer functions to CLC library (PR #116786)

2025-01-22 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: The updated version of this patch removes the SPIR-V header workarounds, and optimizes the `upsample` and `mul_hi` implementations for vector types. All the integer functions in this patch now avoid scalarization. https://github.com/llvm/llvm-project/pull/116786 ___

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Dmitry Polukhin via cfe-commits
@@ -799,14 +817,12 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { } if (D->getFriendObjectKind()) { -// For a function defined inline within a class template, we have to force -// the canonical definition to be the one inside the canonical definition

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-22 Thread Mikael Holmén via cfe-commits
@@ -830,6 +830,16 @@ bool OverlayCDB::setCompileCommand(PathRef File, return true; } +std::unique_ptr +OverlayCDB::getProjectModules(PathRef File) const { + auto MDB = DelegatingCDB::getProjectModules(File); + MDB->setCommandMangler([&Mangler = Mangler](tooling::CompileCom

[libclc] [libclc] Move several integer functions to CLC library (PR #116786)

2025-01-22 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,21 @@ +#ifndef __CLC_INTEGER_CLC_CLZ_H__ +#define __CLC_INTEGER_CLC_CLZ_H__ + +#if defined(CLC_CLSPV) || defined(CLC_SPIRV) +// clspv and spir-v targets provide their own OpenCL-compatible clz +#define __clc_clz clz frasercrmck wrote: @arsenm I've upda

[libclc] [libclc] Move several integer functions to CLC library (PR #116786)

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

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Haojian Wu via cfe-commits
@@ -539,11 +539,12 @@ class ASTReader /// Mapping from main decl ID to the related decls IDs. /// - /// These related decls have to be loaded right after the main decl. - /// It is required to have canonical declaration for related decls from the - /// same module as th

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. Thanks for the fix! It looks good from my side, just small nits. Feel free to land it. https://github.com/llvm/llvm-project/pull/123648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Haojian Wu via cfe-commits
@@ -799,14 +813,14 @@ void ASTDeclWriter::VisitFunctionDecl(FunctionDecl *D) { } if (D->getFriendObjectKind()) { -// For a function defined inline within a class template, we have to force -// the canonical definition to be the one inside the canonical definition

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/123648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Android defaults to pic (PR #123955)

2025-01-22 Thread via cfe-commits
https://github.com/enh-google approved this pull request. or just move `PIC = true;` into the `default:` and delete the explicit list of abis? https://github.com/llvm/llvm-project/pull/123955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-22 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/123428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Android defaults to pic (PR #123955)

2025-01-22 Thread via cfe-commits
https://github.com/hiraditya created https://github.com/llvm/llvm-project/pull/123955 None >From 80f57cb98a39331740d3094342627d3b9c6214ab Mon Sep 17 00:00:00 2001 From: AdityaK Date: Wed, 22 Jan 2025 07:23:20 -0800 Subject: [PATCH] Android defaults to pic --- clang/lib/Driver/ToolChains/Comm

[clang] Android defaults to pic (PR #123955)

2025-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: AdityaK (hiraditya) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/123955.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/CommonArgs.cpp (+1) ``diff diff --

[clang-tools-extra] [clang-tidy][NFC] simplify `TimerGroup` in `ClangTidyProfiling` (PR #123958)

2025-01-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/123958 `TimerGroup` don't need to use as field of `ClangTidyProfiling`. We can construct it local during destructing. >From 7f6fccebdc73f06d920eae75132238c5a884bbea Mon Sep 17 00:00:00 2001 From: Congcong Cai Dat

[clang-tools-extra] [clang-tidy][NFC] simplify `TimerGroup` in `ClangTidyProfiling` (PR #123958)

2025-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes `TimerGroup` don't need to use as field of `ClangTidyProfiling`. We can construct it local during destructing. --- Full diff: https://github.com/llvm/llvm-project/pull/123958.diff 2 Files A

[clang-tools-extra] [clang-tidy] Add EnableQtSupport option to modernize-use-integer-sign-comprison (PR #122127)

2025-01-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/122127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] a2063ba - [clangd][NFC] Delete a pessimizing move

2025-01-22 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2025-01-22T16:04:54+01:00 New Revision: a2063ba7ffdbbb4faf5da5f32739ab761c2e4289 URL: https://github.com/llvm/llvm-project/commit/a2063ba7ffdbbb4faf5da5f32739ab761c2e4289 DIFF: https://github.com/llvm/llvm-project/commit/a2063ba7ffdbbb4faf5da5f32739ab761c2e4289.dif

[clang-tools-extra] aa580c2 - [clang-tidy] Add `EnableQtSupport` option to modernize-use-integer-sign-comprison (#122127)

2025-01-22 Thread via cfe-commits
Author: qt-tatiana Date: 2025-01-22T23:30:53+08:00 New Revision: aa580c2ec5eb4217c945a47a561181be7e7b1032 URL: https://github.com/llvm/llvm-project/commit/aa580c2ec5eb4217c945a47a561181be7e7b1032 DIFF: https://github.com/llvm/llvm-project/commit/aa580c2ec5eb4217c945a47a561181be7e7b1032.diff LO

[clang-tools-extra] [clang-tidy][NFC] simplify `TimerGroup` in `ClangTidyProfiling` (PR #123958)

2025-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes `TimerGroup` don't need to use as field of `ClangTidyProfiling`. We can construct it local during destructing. --- Full diff: https://github.com/llvm/llvm-project/pull/123958.diff 2 Files Affected

[clang] Android no longer supports arm < 7 (PR #123952)

2025-01-22 Thread via cfe-commits
https://github.com/enh-google approved this pull request. or just move Android up with the other gnu/musl SoftFP cases? https://github.com/llvm/llvm-project/pull/123952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [flang] [flang] Add -f[no-]unroll-loops flag (PR #122906)

2025-01-22 Thread David Truby via cfe-commits
DavidTruby wrote: I guess the tests in this should have had --target= for the targets I checked them on (x86_64 and aarch64). I can add those and remove the xfail? https://github.com/llvm/llvm-project/pull/122906 ___ cfe-commits mailing list cfe-commi

[clang] 70f8040 - [LoongArch] Simplify some Args.getLastArg() calls with AddTargetFeature(). NFC

2025-01-22 Thread Weining Lu via cfe-commits
Author: Weining Lu Date: 2025-01-22T17:17:05+08:00 New Revision: 70f8040f099368b2e10f9b12d7f7fdee35c24cee URL: https://github.com/llvm/llvm-project/commit/70f8040f099368b2e10f9b12d7f7fdee35c24cee DIFF: https://github.com/llvm/llvm-project/commit/70f8040f099368b2e10f9b12d7f7fdee35c24cee.diff LO

[clang] [llvm] [llvm][AArch64] apple-m4 does not have FEAT_{SPEv1p2,SEL2,MPAM} (PR #123827)

2025-01-22 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard approved this pull request. LGTM, thanks. https://github.com/llvm/llvm-project/pull/123827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Don't rely on pragma guards in headers (PR #122751)

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

[libclc] [libclc] Don't rely on fp16 pragma guards in headers (PR #122751)

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

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-22 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/123922 >From bb518655127ad49e527bbc2a57a5fd8a3f9f0495 Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Wed, 22 Jan 2025 15:41:41 +0530 Subject: [PATCH] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" li

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/123648 >From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Mon, 20 Jan 2025 09:03:25 -0800 Subject: [PATCH 1/5] [C++20][Modules] Fix crash/compiler error due broken AS

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-01-22 Thread Aniket Lal via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -emit-llvm -o - %s | FileCheck %s + +// CHECK: define dso_local amdgpu_kernel void @callee_kern({{.*}}) +__attribute__((noinline)) kernel void callee_kern(global int *A){ + *A = 1; +} + +__attribute__((noinline)

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Dmitry Polukhin via cfe-commits
@@ -539,11 +539,12 @@ class ASTReader /// Mapping from main decl ID to the related decls IDs. /// - /// These related decls have to be loaded right after the main decl. - /// It is required to have canonical declaration for related decls from the - /// same module as th

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin edited https://github.com/llvm/llvm-project/pull/123648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin commented: Added release note https://github.com/llvm/llvm-project/pull/123648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix handling of immediate escalation for inherited constructors (PR #112860)

2025-01-22 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/112860 >From 6c3317a1b08a0b15e28f6b5a3585a096c4d1e490 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 18 Oct 2024 10:59:35 +0200 Subject: [PATCH 1/3] '[Clang] Fix handling of immediate escalation for inherit

[clang-tools-extra] fbd86d0 - [clang-reorder-fields] Reorder leading comments (#123740)

2025-01-22 Thread via cfe-commits
Author: Clement Courbet Date: 2025-01-22T13:42:00+01:00 New Revision: fbd86d05fe51d45f19df8d63aee41d979c268f8f URL: https://github.com/llvm/llvm-project/commit/fbd86d05fe51d45f19df8d63aee41d979c268f8f DIFF: https://github.com/llvm/llvm-project/commit/fbd86d05fe51d45f19df8d63aee41d979c268f8f.dif

[clang] [clang-tools-extra] [clang-reorder-fields] Reorder leading comments (PR #123740)

2025-01-22 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle closed https://github.com/llvm/llvm-project/pull/123740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Fix global resource initialization (PR #123394)

2025-01-22 Thread Steven Perron via cfe-commits
@@ -536,89 +536,84 @@ void CGHLSLRuntime::generateGlobalCtorDtorCalls() { } } -void CGHLSLRuntime::handleGlobalVarDefinition(const VarDecl *VD, - llvm::GlobalVariable *GV) { - // If the global variable has resource binding, add i

[clang] a7a8694 - Remove references to mips within Android (#123856)

2025-01-22 Thread via cfe-commits
Author: AdityaK Date: 2025-01-22T07:10:21-08:00 New Revision: a7a8694c5a23c04322f22bf8ce5685cb4b1dddc3 URL: https://github.com/llvm/llvm-project/commit/a7a8694c5a23c04322f22bf8ce5685cb4b1dddc3 DIFF: https://github.com/llvm/llvm-project/commit/a7a8694c5a23c04322f22bf8ce5685cb4b1dddc3.diff LOG:

[clang] [Clang] Add predefined macros for integer constants to implement section 7.18.4 of ISO/IEC 9899:1999 in `` in a safe way (PR #123514)

2025-01-22 Thread Manuel Sainz de Baranda y Goñi via cfe-commits
redcode wrote: > Thank you for the fix! Can you also add test coverage for the changes to > `clang/test/Headers` and a release note so users know about the fix to > `clang/docs/ReleaseNotes.rst`? > > Also, precommit CI found relevant failures: > > ``` > TEST 'Clang :: Pre

[clang] 70a16b9 - [HIP] Support managed variables using the new driver (#123437)

2025-01-22 Thread via cfe-commits
Author: Joseph Huber Date: 2025-01-22T09:13:14-06:00 New Revision: 70a16b90ff391ff82ef54d4ae6ffcb5eb50162a0 URL: https://github.com/llvm/llvm-project/commit/70a16b90ff391ff82ef54d4ae6ffcb5eb50162a0 DIFF: https://github.com/llvm/llvm-project/commit/70a16b90ff391ff82ef54d4ae6ffcb5eb50162a0.diff

[clang] [llvm] [HIP] Support managed variables using the new driver (PR #123437)

2025-01-22 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/123437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove references to mips within Android (PR #123856)

2025-01-22 Thread via cfe-commits
https://github.com/hiraditya closed https://github.com/llvm/llvm-project/pull/123856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[HIP] Use original file path for CUID" (#108771) (PR #111885)

2025-01-22 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/111885 >From 5fe838d468f341df6f11a34b489d182f80c097f1 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 25 Sep 2024 14:31:54 -0400 Subject: [PATCH] Reland "[HIP] Use original file path for CUID" (#108771) T

[clang] [Clang] Add predefined macros for integer constants to implement section 7.18.4 of ISO/IEC 9899:1999 in `` in a safe way (PR #123514)

2025-01-22 Thread Manuel Sainz de Baranda y Goñi via cfe-commits
https://github.com/redcode updated https://github.com/llvm/llvm-project/pull/123514 From 507b9804cc748a2441db8d1eb36a01be34bc21ce Mon Sep 17 00:00:00 2001 From: redcode Date: Sun, 19 Jan 2025 15:29:01 +0100 Subject: [PATCH] [Clang] Add predefined macros `__INT_C`, `__UINT_C`, `__INTMAX_C` and

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-22 Thread Petr Polezhaev via cfe-commits
https://github.com/petr-polezhaev edited https://github.com/llvm/llvm-project/pull/122606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Android no longer supports arm < 7 (PR #123952)

2025-01-22 Thread via cfe-commits
https://github.com/hiraditya created https://github.com/llvm/llvm-project/pull/123952 None >From fab3807f326e6e6ed765b562bce0676956eabc9f Mon Sep 17 00:00:00 2001 From: AdityaK Date: Wed, 22 Jan 2025 07:14:34 -0800 Subject: [PATCH] Android no longer supports arm < 7 --- clang/lib/Driver/Tool

[clang] Android no longer supports arm < 7 (PR #123952)

2025-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: AdityaK (hiraditya) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/123952.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Arch/ARM.cpp (+1-1) ``diff diff --git a/clang/lib/Driver/ToolChains/

[clang] Android no longer supports arm < 7 (PR #123952)

2025-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm Author: AdityaK (hiraditya) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/123952.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Arch/ARM.cpp (+1-1) ``diff diff --git a/clang/lib/Driver/ToolC

[clang] Android no longer supports arm < 7 (PR #123952)

2025-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: AdityaK (hiraditya) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/123952.diff 1 Files Affected: - (modified) clang/lib/Driver/ToolChains/Arch/ARM.cpp (+1-1) ``diff diff --git a/clang/lib/Driver/Tool

[clang] Reland "[HIP] Use original file path for CUID" (#108771) (PR #111885)

2025-01-22 Thread Yaxun Liu via cfe-commits
@@ -1,13 +1,15 @@ // Check CUID generated by hash. // The same CUID is generated for the same file with the same options. +// RUN: cd %S + // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu --no-offload-new-driver \ // RUN: --offload-arch=gfx906 -c -nogpuinc -no

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-22 Thread Steven Perron via cfe-commits
@@ -2132,6 +2135,33 @@ bool SPIRVInstructionSelector::selectWaveActiveCountBits( return Result; } +bool SPIRVInstructionSelector::selectWaveReduceMax(Register ResVReg, + const SPIRVType *ResType, +

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-22 Thread Steven Perron via cfe-commits
https://github.com/s-perron approved this pull request. LGTM, just a couple small touchups. https://github.com/llvm/llvm-project/pull/123428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveMax` intrinsic (PR #123428)

2025-01-22 Thread Steven Perron via cfe-commits
@@ -0,0 +1,55 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o - -filetype=obj | spirv-val %} + +; Test lowering to spir-v backend for various types and scalar/vec

[clang] Remove incorrect CUDA defines (PR #123898)

2025-01-22 Thread Sergey Kozub via cfe-commits
https://github.com/sergey-kozub updated https://github.com/llvm/llvm-project/pull/123898 >From 1c4a581d45b622591f5062830f2ff1e33b159a64 Mon Sep 17 00:00:00 2001 From: Sergey Kozub Date: Wed, 22 Jan 2025 07:38:55 + Subject: [PATCH] Remove incorrect CUDA defines --- clang/include/clang/Basi

[clang] Remove incorrect CUDA defines (PR #123898)

2025-01-22 Thread Sergey Kozub via cfe-commits
@@ -89,12 +89,8 @@ CudaVersion getCudaVersion(uint32_t raw_version) { return CudaVersion::CUDA_125; if (raw_version < 12070) return CudaVersion::CUDA_126; - if (raw_version < 12080) -return CudaVersion::CUDA_127; if (raw_version < 12090) return CudaVersio

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-01-22 Thread Aniket Lal via cfe-commits
@@ -2343,6 +2343,15 @@ void CodeGenModule::ConstructAttributeList(StringRef Name, // Collect function IR attributes from the CC lowering. // We'll collect the paramete and result attributes later. CallingConv = FI.getEffectiveCallingConvention(); + GlobalDecl GD = Calle

[clang] [llvm] [LoongArch] Support sc.q instruction for 128bit cmpxchg operation (PR #116771)

2025-01-22 Thread via cfe-commits
https://github.com/tangaac updated https://github.com/llvm/llvm-project/pull/116771 >From ad154c5eb1d382b5b15f48005df039b94d4500b1 Mon Sep 17 00:00:00 2001 From: tangaac Date: Tue, 19 Nov 2024 17:43:31 +0800 Subject: [PATCH 1/5] [LoongArch] Support sc.q instruction for 128bit cmpxchg operation

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-01-22 Thread Aniket Lal via cfe-commits
@@ -71,14 +71,19 @@ class GlobalDecl { GlobalDecl(const FunctionDecl *D, unsigned MVIndex = 0) : MultiVersionIndex(MVIndex) { if (!D->hasAttr()) { + if (D->hasAttr()) { +Value.setPointerAndInt(D, unsigned(KernelReferenceKind::Kernel)); +return;

[clang] Remove incorrect CUDA defines (PR #123898)

2025-01-22 Thread Durgadoss R via cfe-commits
https://github.com/durga4github approved this pull request. Changes look good to me. Let us wait for Artem's review https://github.com/llvm/llvm-project/pull/123898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[libclc] [libclc] Move fp16 pragma guards out of header file (PR #122751)

2025-01-22 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. Title is misleading now, since this isn't moving the guards anymore https://github.com/llvm/llvm-project/pull/122751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[libclc] [libclc] Don't rely on fp16 pragma guards in headers (PR #122751)

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

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-22 Thread Petr Polezhaev via cfe-commits
petr-polezhaev wrote: Didn't knew that's a thing now. Removed the checkbox over the private email, should be ok now. Somehow missed the clang-format issue again (I thought I fixed it) - updated to calm it down https://github.com/llvm/llvm-project/pull/122606 ___

[libclc] [libclc] Don't rely on fp16 pragma guards in headers (PR #122751)

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

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/123413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Fix crash/compiler error due broken AST links (PR #123648)

2025-01-22 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/123648 >From e5cd06ddbc4193f9d5910eba93f0eb309d67063c Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Mon, 20 Jan 2025 09:03:25 -0800 Subject: [PATCH 1/4] [C++20][Modules] Fix crash/compiler error due broken AS

[clang] Clang/Preprocessor: Support short circuit in directive (PR #123912)

2025-01-22 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/123912 >From f0010f932ae3c89651c631736a7aa495027e8fdc Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Wed, 22 Jan 2025 09:04:44 + Subject: [PATCH] Clang/Preprocessor: Support short circuit in directive Don't Eval

[clang] [PS4/PS5][Driver] Observe /target/lib for libraries (PR #123350)

2025-01-22 Thread Jeremy Morse via cfe-commits
@@ -174,25 +174,26 @@ // Test implicit library search paths are supplied to the linker, after any // search paths specified by the user. /target/lib is implicitly -// added if it exists and no --sysroot is specified. CRT objects are found -// there. "." is always implicitly ad

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-01-22 Thread Erich Keane via cfe-commits
erichkeane wrote: > Hi @erichkeane, thank you for the feedback! I understand that the lexing > logic should be moved to the parser. Could you please point me toward > specific areas in the parser where this logic should be integrated? A bit > more detail would help me ensure this is implemente

[clang] WIP: [clang] MicrosoftCXXABI: Fix exception copy constructor LUT after loading AST (PR #114075)

2025-01-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I have no idea here as this touches both modules AND MSVC ABI. That said, it seems really odd that we'd have to store this rather than calculate it on deserialization. Perhaps @ChuanqiXu9 can take a look as someone more familiar with our serialization

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2025-01-22 Thread via cfe-commits
https://github.com/sivan-shani closed https://github.com/llvm/llvm-project/pull/118771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-22 Thread Erich Keane via cfe-commits
erichkeane wrote: No idea why I can't respond to the individual threads but... >The coding standards don't specify to add a comment there and a brief survey >of other headers in this directory indicates considerable inconsistency (72 >out of 123 .h files have them). I guess that is over 50% so

[clang] [SYCL] AST support for SYCL kernel entry point functions. (PR #122379)

2025-01-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. make format happy, then LGTM. https://github.com/llvm/llvm-project/pull/122379 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-22 Thread Aaron Ballman via cfe-commits
@@ -166,7 +166,8 @@ getScopeFromNormalizedScopeName(StringRef ScopeName) { .Case("hlsl", AttributeCommonInfo::Scope::HLSL) .Case("msvc", AttributeCommonInfo::Scope::MSVC) .Case("omp", AttributeCommonInfo::Scope::OMP) - .Case("riscv", AttributeCommonInfo::

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

2025-01-22 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -fsyntax-only -Wunknown-attribute-namespace=foo,bar -std=c23 -verify %s AaronBallman wrote: Can you also add a `RUN` line with `-x c++` to show we get the same behavior in C and C++? Also, we may want to consider adding a `

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

2025-01-22 Thread Aaron Ballman via cfe-commits
@@ -1115,6 +1115,11 @@ defm cx_fortran_rules: BoolOptionWithoutMarshalling<"f", "cx-fortran-rules", NegFlag>; +def Wunknown_attribute_namespace_EQ : CommaJoined<["-"], "Wunknown-attribute-namespace=">, + Group, Flags<[HelpHidden]>, Visibility<[ClangOption, CC1Option]>, +

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

2025-01-22 Thread Aaron Ballman via cfe-commits
@@ -822,8 +822,9 @@ def NSobjectAttribute : DiagGroup<"NSObject-attribute">; def NSConsumedMismatch : DiagGroup<"nsconsumed-mismatch">; def NSReturnsMismatch : DiagGroup<"nsreturns-mismatch">; +def UnknownAttributeNamespace : DiagGroup<"unknown-attribute-namespace">; -

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2025-01-22 Thread via cfe-commits
cor3ntin wrote: I am investigating the build failures and will revert or commit a fix shortly https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] 2b0e225 - [clangd] Support .clangd command line modifications for C++ modules (#122606)

2025-01-22 Thread via cfe-commits
Author: Petr Polezhaev Date: 2025-01-22T17:27:28+08:00 New Revision: 2b0e2255d6067872e844ff07d67342a6c97d8049 URL: https://github.com/llvm/llvm-project/commit/2b0e2255d6067872e844ff07d67342a6c97d8049 DIFF: https://github.com/llvm/llvm-project/commit/2b0e2255d6067872e844ff07d67342a6c97d8049.diff

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-22 Thread via cfe-commits
github-actions[bot] wrote: @petr-polezhaev Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang-tools-extra] [clangd] Support .clangd command line modifications for C++ modules (PR #122606)

2025-01-22 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/122606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2025-01-22 Thread Haojian Wu via cfe-commits
hokein wrote: > I like 1, but not really 2, I think we should wait for this to be reasonably > complete before merging it, particularly this close to the release. I'd > probably be ok with 2 if we wait a few weeks until after the release, so that > we can deal with the fallout with less stress

[clang] d2e5103 - [C++20] [Modules] Correct the visibility of decls in implicit global module of other units in the same TU

2025-01-22 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-01-22T17:24:12+08:00 New Revision: d2e510360fc9b17a3ad536582f076795c4c37634 URL: https://github.com/llvm/llvm-project/commit/d2e510360fc9b17a3ad536582f076795c4c37634 DIFF: https://github.com/llvm/llvm-project/commit/d2e510360fc9b17a3ad536582f076795c4c37634.diff LO

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-22 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 created https://github.com/llvm/llvm-project/pull/123922 ASan bitcode linking is currently available for HIPAMD,OpenMP and OpenCL. Moving sanitizer specific common parts of logic to appropriate API's so as to reduce code redundancy and maintainability. >From f

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-22 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/123922 >From 0c62a289551a2b867448cb3f04ef901ad93799a3 Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Wed, 22 Jan 2025 15:41:41 +0530 Subject: [PATCH] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" li

[clang] [Driver][ASan] Refactor Clang-Driver "Sanitizer Bitcode" linking. (PR #123922)

2025-01-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Amit Kumar Pandey (ampandey-1995) Changes ASan bitcode linking is currently available for HIPAMD,OpenMP and OpenCL. Moving sanitizer specific common parts of logic to appropriate API's so as to reduce code redundancy and maintain

[clang] [clang-tools-extra] Clang/Preprocessor: Not add headers of __has_include into DepColloctor (PR #120673)

2025-01-22 Thread YunQiang Su via cfe-commits
wzssyqa wrote: See: https://github.com/llvm/llvm-project/pull/123912 https://github.com/llvm/llvm-project/pull/120673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 974f678 - [HIP] [NFC] Rename to ClangArgs (really)

2025-01-22 Thread via cfe-commits
Author: Xeonacid Date: 2025-01-22T18:08:12+08:00 New Revision: 974f678d31969cf83a5b2828cc63120734ac82f3 URL: https://github.com/llvm/llvm-project/commit/974f678d31969cf83a5b2828cc63120734ac82f3 DIFF: https://github.com/llvm/llvm-project/commit/974f678d31969cf83a5b2828cc63120734ac82f3.diff LOG:

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-01-22 Thread Aniket Lal via cfe-commits
@@ -1780,6 +1786,15 @@ void CXXNameMangler::mangleDeviceStubName(const IdentifierInfo *II) { << II->getName(); } +void CXXNameMangler::mangleOCLDeviceStubName(const IdentifierInfo *II) { + // ::= __clang_ocl_kern_imp_ + // ::= [n] + // ::= + StringRef OCLDevi

[clang] Clang/Preprocessor: Support short circuit in directive (PR #123912)

2025-01-22 Thread Michael Spencer via cfe-commits
Bigcheese wrote: It's an alternative to https://github.com/llvm/llvm-project/pull/120673 This resolves my concerns with the original patch, and I'm pretty sure it doesn't cause any other issues, but I do plan to take a closer look in a bit. https://github.com/llvm/llvm-project/pull/123912

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-01-22 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -emit-llvm -o - %s | FileCheck %s + +// CHECK: define dso_local amdgpu_kernel void @callee_kern({{.*}}) +__attribute__((noinline)) kernel void callee_kern(global int *A){ + *A = 1; +} + +__attribute__((noinline)

[clang] [llvm] [PseudoProbe] Support emitting to COFF object (PR #123870)

2025-01-22 Thread Haohai Wen via cfe-commits
@@ -12,7 +12,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" +target triple = "x86_64-unknown--" HaohaiWen wrote: Can we simply remove `target triple` and `target datalayout ` in IR? https://githu

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-22 Thread Erich Keane via cfe-commits
@@ -13464,6 +13464,14 @@ Decl *Sema::ActOnAliasDeclaration(Scope *S, AccessSpecifier AS, } TemplateParameterList *TemplateParams = TemplateParamLists[0]; +// Check shadowing of a template parameter name +for (NamedDecl *TP : TemplateParams->asArray()) { +

[clang-tools-extra] [clang-tidy] Fix modernize-use-integer-sign-comparison comparison (PR #121506)

2025-01-22 Thread via cfe-commits
https://github.com/qt-tatiana updated https://github.com/llvm/llvm-project/pull/121506 >From 0591e8b7be49299e2b73634a6ad4f2330557b37a Mon Sep 17 00:00:00 2001 From: Tatiana Borisova Date: Thu, 2 Jan 2025 18:08:26 +0100 Subject: [PATCH 1/4] [clang-tidy] Fix modernize-use-integer-sign-comparison

[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #122841)

2025-01-22 Thread via cfe-commits
@@ -847,11 +869,104 @@ static bool areExprsMacroAndNonMacro(const Expr *&LhsExpr, if (!LhsExpr || !RhsExpr) return false; - SourceLocation LhsLoc = LhsExpr->getExprLoc(); - SourceLocation RhsLoc = RhsExpr->getExprLoc(); + const SourceLocation LhsLoc = LhsExpr->getExp

[clang-tools-extra] [clang-tidy] Address false positives in misc-redundant-expression checker (PR #122841)

2025-01-22 Thread via cfe-commits
@@ -847,11 +869,104 @@ static bool areExprsMacroAndNonMacro(const Expr *&LhsExpr, if (!LhsExpr || !RhsExpr) return false; - SourceLocation LhsLoc = LhsExpr->getExprLoc(); - SourceLocation RhsLoc = RhsExpr->getExprLoc(); + const SourceLocation LhsLoc = LhsExpr->getExp

[clang] [Clang] Add predefined macros for integer constants to implement section 7.18.4 of ISO/IEC 9899:1999 in `` in a safe way (PR #123514)

2025-01-22 Thread Manuel Sainz de Baranda y Goñi via cfe-commits
https://github.com/redcode updated https://github.com/llvm/llvm-project/pull/123514 From 507b9804cc748a2441db8d1eb36a01be34bc21ce Mon Sep 17 00:00:00 2001 From: redcode Date: Sun, 19 Jan 2025 15:29:01 +0100 Subject: [PATCH 1/2] [Clang] Add predefined macros `__INT_C`, `__UINT_C`, `__INTMAX_C`

[clang] Clang/Preprocessor: Support short circuit in directive (PR #123912)

2025-01-22 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I think it would be more useful in practice if the deprecation warnings > respected lazy evaluation, as the PR suggests, but it's worth noting that > this deviates from the C Standard, which specifies that macros are replaced > first, before short-circuit evaluation takes

<    1   2   3   4   5   >