[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/134536 >From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 6 Apr 2025 14:31:35 +0200 Subject: [PATCH 1/2] [CIR] Upstream ArraySubscriptExpr for fixed size array -

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Amr Hesham via cfe-commits
@@ -232,6 +233,161 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [HLSL] Desugar ConstantArrayType when calculating cbuffer field layout (PR #134683)

2025-04-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/134683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-07 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: To be clear, this PR is basically cherry-picking https://github.com/swiftlang/llvm-project/pull/9076, but we are only taking what is necessary to fix our problem at the moment. I updated the description to reflect this. > What does temporarily mean here? Is it until the proj

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,186 @@ +// RUN: %clang_cc1 -fsycl-is-host -emit-llvm -triple x86_64-unknown-linux-gnu %s -o - | FileCheck --check-prefixes=CHECK-HOST,CHECK-HOST-LINUX %s +// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -aux-triple x86_64-unknown-linux-gnu -triple amdgcn-amd-amdhsa %s

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/133030 >From 2c99027df798c04d252ff8f66853888db89356f1 Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Tue, 25 Mar 2025 09:31:11 -0700 Subject: [PATCH 1/4] [SYCL] Basic code generation for SYCL kernel caller

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) sarnex wr

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
@@ -5402,6 +5407,10 @@ LangAS CodeGenModule::GetGlobalConstantAddressSpace() const { // UniformConstant storage class is not viable as pointers to it may not be // casted to Generic pointers which are used to model HIP's "flat" pointers. return LangAS::cuda_device

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-07 Thread Aaron Ballman via cfe-commits
@@ -52,6 +54,7 @@ typedef struct { * to `std::string::c_str()`. */ CINDEX_LINKAGE const char *clang_getCString(CXString string); +CINDEX_LINKAGE const char *clang_getCString2(CXString string, size_t *length); AaronBallman wrote: We should document that `leng

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/134551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-07 Thread Aaron Ballman via cfe-commits
@@ -14,6 +14,7 @@ #ifndef LLVM_CLANG_C_CXSTRING_H #define LLVM_CLANG_C_CXSTRING_H +#include AaronBallman wrote: Better to put this at the end of the include list; that leaves less chance for those headers to accidentally transitively include stddef.h withou

[clang] [Clang] add ext warning for missing return in 'main' for C89 mode (PR #134617)

2025-04-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/134617 Fixes #21650 --- Clang currently inserts an implicit `return 0;` in `main()` when compiling in `C89` mode, even though the `C89` standard doesn't require this behavior. This patch changes that behavior b

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: > 1 Is size_t appropriate here? I see some functions using unsigned, and some > using size_t. I think it's an appropriate type to use (`unsigned` would also be fine, but I tend to prefer `size_t` for this sort of use, personally). > 2 On this new fl

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-04-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @DKLoehr @AaronBallman Did you see the revert? Thank you for the ping, I did not see the revert. Thanks for catching that and sorry for the disruption! Given that this disrupts both LLVM and libc++, I think that's plenty of signal that "on by default" isn't really the be

[clang] [llvm] Enable unnecessary-virtual-specifier by default (PR #133265)

2025-04-07 Thread Hans Wennborg via cfe-commits
zmodem wrote: > I think moving it to -Wextra may be a more palatable approach. What do others > think? Sounds good to me, and I think James makes a good argument. Does that actually help LLVM and libc++ though? I think at least LLVM does enable -Wextra. https://github.com/llvm/llvm-project/p

[clang] [clang-format] Add 'cl' to enable OpenCL kernel file formatting (PR #134529)

2025-04-07 Thread via cfe-commits
mydeveloperday wrote: should we consider .ocl? https://github.com/llvm/llvm-project/pull/134529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add more tests for _Countof (PR #133333)

2025-04-07 Thread Alejandro Colomar via cfe-commits
https://github.com/alejandro-colomar updated https://github.com/llvm/llvm-project/pull/13 >From eb63ad49de452c88fe7739172da9c17eadfce2d4 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 27 Mar 2025 23:51:18 +0100 Subject: [PATCH] Add more tests for _Countof Link:

[clang] Add more tests for _Countof (PR #133333)

2025-04-07 Thread Alejandro Colomar via cfe-commits
@@ -121,10 +150,14 @@ void test_typedefs() { static_assert(_Countof(*x) == 12); } -void test_zero_size_arrays() { +void test_zero_size_arrays(int n) { int array[0]; // expected-warning {{zero size arrays are an extension}} static_assert(_Countof(array) == 0); static

[clang] Add more tests for _Countof (PR #133333)

2025-04-07 Thread Alejandro Colomar via cfe-commits
https://github.com/alejandro-colomar edited https://github.com/llvm/llvm-project/pull/13 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix emitting dtors of zero-sized arrays (PR #134672)

2025-04-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/134672 Desc->getNumElems() returning 0 made us underflow here. >From 276b187e1d988b26d357052cce239e7eccd0cb4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 7 Apr 2025 17:25:06 +0200 Subject:

[clang] Mark CXX module initializer with PACBTI attributes (PR #133716)

2025-04-07 Thread Victor Campos via cfe-commits
https://github.com/vhscampos updated https://github.com/llvm/llvm-project/pull/133716 >From bb649666995a2642c5eea944e55c0a38503ed7bf Mon Sep 17 00:00:00 2001 From: Victor Campos Date: Fri, 28 Mar 2025 15:55:07 + Subject: [PATCH 1/4] Mark CXX module initializer with PACBTI attributes The CX

[clang-tools-extra] [clang-tidy] give dummy path when create ClangTidyContext (PR #134670)

2025-04-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/134670 #121323 changed the way the absolute path is computed. Empty file name will cause absolute path ignore current folder. This patch add "dummy" file name to avoid this issue Fixed: #134502 >From 5849dd810154

[clang-tools-extra] [clang-tidy] give dummy path when create ClangTidyContext (PR #134670)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes #121323 changed the way the absolute path is computed. Empty file name will cause absolute path ignore current folder. This patch add "dummy" file name to avoid

[clang] [clang][bytecode] Fix emitting dtors of zero-sized arrays (PR #134672)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Desc->getNumElems() returning 0 made us underflow here. --- Full diff: https://github.com/llvm/llvm-project/pull/134672.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+11-9) - (m

[clang] [clang][bytecode] Fix emitDestruction() for dummy descriptors (PR #134665)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This might happen if the referenced declaration is invalid and thus gets a dummy descriptor. We ran into an assertion later on. --- Full diff: https://github.com/llvm/llvm-project/pull/134665.diff 2 Files

[clang] clang_EvalResult_getAsCXString impl (PR #134551)

2025-04-07 Thread Damian Andrei via cfe-commits
https://github.com/xTachyon updated https://github.com/llvm/llvm-project/pull/134551 >From 88a7517918ff8f6a5521527e9e1a141af09035c5 Mon Sep 17 00:00:00 2001 From: Andrei Damian Date: Sun, 6 Apr 2025 19:55:59 +0300 Subject: [PATCH 1/2] clang_EvalResult_getAsCXString impl --- clang/include/clan

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-07 Thread Paul Kirth via cfe-commits
@@ -1692,6 +1692,19 @@ PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, if (ThinLTO && PGOOpt && PGOOpt->Action == PGOOptions::SampleUse) MPM.addPass(buildThinLTODefaultPipeline(Level, /*ImportSummary=*/nullptr)); else { +// ModuleSimp

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-07 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > > I see that the LowerOperationWrapper still emits i128 operations. (E.g. you > > expand a f16->i128 into a f16->f32 and f32->i128) But that routine is > > called because of the illegal input type i128, so I understand it must not > > leave any operations with the illegal typ

[clang] e2fe787 - [Clang] Use "syncscope" instead of "synchscope". NFC. (#134616)

2025-04-07 Thread via cfe-commits
Author: Jay Foad Date: 2025-04-07T13:32:36+01:00 New Revision: e2fe78797fa39e22ebb3c65383d1bd30490535e5 URL: https://github.com/llvm/llvm-project/commit/e2fe78797fa39e22ebb3c65383d1bd30490535e5 DIFF: https://github.com/llvm/llvm-project/commit/e2fe78797fa39e22ebb3c65383d1bd30490535e5.diff LOG:

[clang] [Clang] Use "syncscope" instead of "synchscope". NFC. (PR #134616)

2025-04-07 Thread Jay Foad via cfe-commits
https://github.com/jayfoad closed https://github.com/llvm/llvm-project/pull/134616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add more tests for _Countof (PR #133333)

2025-04-07 Thread Alejandro Colomar via cfe-commits
https://github.com/alejandro-colomar edited https://github.com/llvm/llvm-project/pull/13 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add more tests for _Countof (PR #133333)

2025-04-07 Thread Alejandro Colomar via cfe-commits
@@ -144,3 +177,13 @@ void test_compound_literals() { static_assert(_Countof((int[2]){}) == 2); static_assert(_Countof((int[]){1, 2, 3, 4}) == 4); } + +static int test_f1(); +static int test_f2(); // expected-warning {{never defined}} + +void test_symbols() { + int a[gl

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

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

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

2025-04-07 Thread via cfe-commits
https://github.com/cor3ntin commented: A few nits. My intent is to approve the pr once they are addressed @AaronBallman @erichkeane https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

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

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

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

2025-04-07 Thread via cfe-commits
@@ -16421,33 +16715,70 @@ CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) { return true; auto *MD = dyn_cast(FnDecl); + auto ConstructDestroyingDeleteAddressType = [&]() { +assert(MD); +return SemaRef.Context.getCanonicalType(SemaRef.Context

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-04-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/131804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Suppress gnu-line-marker when saving temps (PR #134621)

2025-04-07 Thread via cfe-commits
https://github.com/macurtis-amd updated https://github.com/llvm/llvm-project/pull/134621 >From 2f2396511137feb21446b93dc344cd82a245627f Mon Sep 17 00:00:00 2001 From: Matthew Curtis Date: Sat, 5 Apr 2025 04:34:03 -0500 Subject: [PATCH] [clang][driver] Suppress gnu-line-marker when saving temps

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Erich Keane via cfe-commits
@@ -232,6 +233,161 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This also seems to be missing a test that does: C++->CIR C++->CIR->LLVM C++->LLVM all in teh same file? (See files iwth `OGCG` in them). https://github.com/llvm/llvm-project/pull/134536 ___ cfe-commits maili

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Erich Keane via cfe-commits
@@ -232,6 +233,161 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { llvm_unreachable("Unknown unary operator kind!"); } +/// If the specified expr is a simple decay from an array to pointer, +/// return the array subexpression. +/// FIXME: this could be

[clang] [clang][doc]: Merge entries with duplicate content. (PR #134089)

2025-04-07 Thread via cfe-commits
YLChenZ wrote: Why is that? It's strange, the first patch I just merged the same Heading, and then according to your suggestion, the second patch merged the same Content entries. Then the third patch: did not include Undocumented. I used the build steps you gave to get this: ![屏幕截图 2025-04-07

[clang] [CIR] Add if statement support (PR #134333)

2025-04-07 Thread Erich Keane via cfe-commits
@@ -0,0 +1,254 @@ +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll +/

[clang] [Clang][ARM] Ensure FPU Features are parsed when targeting `cc1as` (PR #134612)

2025-04-07 Thread David Spickett via cfe-commits
@@ -0,0 +1,32 @@ +// REQUIRES: arm-registered-target +// Ensures that when targeting an ARM target with an Asm file, clang DavidSpickett wrote: I have often been asked to use `///` for comments that were actually comments. I think it is marginally easier to read

[clang] [Clang] add ext warning for missing return in 'main' for C89 mode (PR #134617)

2025-04-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! https://github.com/llvm/llvm-project/pull/134617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] add ext warning for missing return in 'main' for C89 mode (PR #134617)

2025-04-07 Thread Aaron Ballman via cfe-commits
@@ -1031,6 +1031,8 @@ def err_mainlike_template_decl : Error<"%0 cannot be a template">; def err_main_returns_nonint : Error<"'main' must return 'int'">; def ext_main_returns_nonint : ExtWarn<"return type of 'main' is not 'int'">, InGroup; +def ext_main_no_return : Extensi

[clang] e288577 - [libc] Fix function that wasn't updated in wrapper headers

2025-04-07 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2025-04-07T10:30:58-05:00 New Revision: e2885772f05ddf9d81c54c5489801108838ca053 URL: https://github.com/llvm/llvm-project/commit/e2885772f05ddf9d81c54c5489801108838ca053 DIFF: https://github.com/llvm/llvm-project/commit/e2885772f05ddf9d81c54c5489801108838ca053.diff

[clang] Reland [Clang][Cmake] fix libtool duplicate member name warnings (PR #133850)

2025-04-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-sharedlibs` running on `linaro-flang-aarch64-sharedlibs` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/80/builds/12287 Here is t

[clang] [llvm] [fatlto] Use the ThinLTO default pipeline for FatLTO (PR #134434)

2025-04-07 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/134434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [fatlto] Add coroutine passes when using FatLTO with ThinLTO (PR #134434)

2025-04-07 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/134434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Sirui Mu (Lancern) Changes This PR upstreams initial support for making function calls in CIR. Function arguments and return values are not included to keep the patch small for review. Related to #132487 --- Patch is 27.90 KiB, trunca

[clang] Reland [Clang][Cmake] fix libtool duplicate member name warnings (PR #133850)

2025-04-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-latest-gcc` running on `linaro-flang-aarch64-latest-gcc` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/130/builds/12053 Here is

[clang] [HLSL] Include SPIRV in LLVM_TARGETS_TO_BUILD in the HLSL cmake cache (PR #133287)

2025-04-07 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/10100 Here is the relevant piece of the build log f

[clang] [-Wunsafe-buffer-usage] Fix false positives for string literals (PR #115554)

2025-04-07 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple closed https://github.com/llvm/llvm-project/pull/115554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] fix diagnostic printing of expressions ignoring LangOpts (PR #134693)

2025-04-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/134693 Currently when printing a template argument of expression type, the expression is converted immediately into a string to be sent to the diagnostic engine, unsing a fake LangOpts. This makes the expression pri

[clang] [Clang][OpenCL] Fix wait_for_event argument address space with -fdeclare-opencl-builtins (PR #134598)

2025-04-07 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez edited https://github.com/llvm/llvm-project/pull/134598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/133030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-07 Thread Alexander Kornienko via cfe-commits
alexfh wrote: > We're seeing another problem after this commit: seemingly bogus `class member > cannot be redeclared` errors. I'll try to provide a reduced repro on Monday. My cvise has been running for quite a while. I'll post the test once it concludes. https://github.com/llvm/llvm-project

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-07 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: libcalls emission: For the uint->fp, SelectionDAGLegalize::ExpandLegalINT_TO_FP() has an assertion before the last attempt involving converting to SINT_TO_FP, that makes sure that this optimization is possible. If I change that to return SDValue() instead of asserting, these

[clang] [HLSL] Implement the dst HLSL Function (PR #133828)

2025-04-07 Thread via cfe-commits
@@ -174,6 +174,31 @@ const inline float distance(__detail::HLSL_FIXED_VECTOR X, __detail::HLSL_FIXED_VECTOR Y) { return __detail::distance_vec_impl(X, Y); } +//===--===// +// dst

[clang] fbc8335 - [MLIR][OpenMP] Add codegen for teams reductions (#133310)

2025-04-07 Thread via cfe-commits
Author: Jan Leyonberg Date: 2025-04-07T12:47:16-04:00 New Revision: fbc8335311b27d73fb685d5ebfb702f7acf134d2 URL: https://github.com/llvm/llvm-project/commit/fbc8335311b27d73fb685d5ebfb702f7acf134d2 DIFF: https://github.com/llvm/llvm-project/commit/fbc8335311b27d73fb685d5ebfb702f7acf134d2.diff

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,73 @@ +//===- CodeGenSYCL.cpp - Code for SYCL kernel generation --===// +// +// 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: Apa

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,186 @@ +// RUN: %clang_cc1 -fsycl-is-host -emit-llvm -triple x86_64-unknown-linux-gnu %s -o - | FileCheck --check-prefixes=CHECK-HOST,CHECK-HOST-LINUX %s +// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -aux-triple x86_64-unknown-linux-gnu -triple amdgcn-amd-amdhsa %s

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Tom Honermann via cfe-commits
@@ -732,6 +732,16 @@ CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType, RequiredArgs::All); } +const CGFunctionInfo & +CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType, +

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Tom Honermann via cfe-commits
@@ -14794,9 +14803,36 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } -static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType, +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, +

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Tom Honermann via cfe-commits
@@ -732,6 +732,16 @@ CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType, RequiredArgs::All); } +const CGFunctionInfo & +CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType, +

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-07 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > This PR temporarily turns off negative directory caching to fix the build > failures. What does temporarily mean here? Is it until the project identified with errors can resolve themselves? Is it until error detection in the build system can catch cases where negative sta

[clang] [HLSL] Desugar ConstantArrayType when calculating cbuffer field layout (PR #134683)

2025-04-07 Thread Helena Kotas via cfe-commits
@@ -195,7 +195,8 @@ bool HLSLBufferLayoutBuilder::layoutField(const FieldDecl *FD, // Unwrap array to find the element type and get combined array size. QualType Ty = FieldTy; while (Ty->isConstantArrayType()) { - const ConstantArrayType *ArrayTy = cast(Ty); +

[clang-tools-extra] [clang-tidy] Use --match-full-lines instead of --strict-whitespace in check_clang_tidy (PR #133756)

2025-04-07 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/133756 >From 3f332176331ff0da2413eae0db9e7f9ce816bbd1 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Mon, 7 Apr 2025 13:51:59 -0400 Subject: [PATCH] [clang-tidy] Use --match-full-lines instead of --strict-wh

[clang-tools-extra] [clang-tidy] Use --match-full-lines instead of --strict-whitespace in check_clang_tidy (PR #133756)

2025-04-07 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/133756 >From 3f332176331ff0da2413eae0db9e7f9ce816bbd1 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Mon, 7 Apr 2025 13:51:59 -0400 Subject: [PATCH] [clang-tidy] Use --match-full-lines instead of --strict-wh

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-07 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/133030 >From 2c99027df798c04d252ff8f66853888db89356f1 Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Tue, 25 Mar 2025 09:31:11 -0700 Subject: [PATCH 1/3] [SYCL] Basic code generation for SYCL kernel caller

[clang] [HLSL] Desugar ConstantArrayType when calculating cbuffer field layout (PR #134683)

2025-04-07 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/134683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Move CodeGen cuda.h to Inputs from include (PR #134706)

2025-04-07 Thread Artem Belevich via cfe-commits
Artem-B wrote: Fixes test break introduced by #134459 https://github.com/llvm/llvm-project/pull/134706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Move CodeGen cuda.h to Inputs from include (PR #134706)

2025-04-07 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/134706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) sarnex wr

[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

2025-04-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/134536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [fatlto] Add coroutine passes when using FatLTO with ThinLTO (PR #134434)

2025-04-07 Thread Nikita Popov via cfe-commits
nikic wrote: /cherry-pick 268c065eab06b81a0d7256ac62c0865b3781e236 https://github.com/llvm/llvm-project/pull/134434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement the dst HLSL Function (PR #133828)

2025-04-07 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/133828 >From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Mon, 31 Mar 2025 16:49:18 -0700 Subject: [PATCH 01/12] Implement a dst function with test cases for HL

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
@@ -5384,6 +5384,11 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { LangAS AS; if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; +if (LangOpts.OpenMPIsTargetDevice && getTriple().isSPIRV()) sarnex wr

[clang] [Clang] Unify 'nvptx-arch' and 'amdgpu-arch' into 'offload-arch' (PR #134713)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-amdgpu Author: Joseph Huber (jhuber6) Changes Summary: These two tools do the same thing, we should unify them into a single tool. We create symlinks for backward compatiblity and provide a way to get the old vendor spe

[clang] [llvm] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global constants (PR #134399)

2025-04-07 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/134399 >From 3812b132c83e4a2e7ae9bd0b5ecefe7232f86af1 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Thu, 3 Apr 2025 09:08:44 -0700 Subject: [PATCH 1/4] [clang][OpenMP][SPIR-V] Fix addrspace of globals and global

[clang] [Clang] add ext warning for missing return in 'main' for C89 mode (PR #134617)

2025-04-07 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,6 @@ +/* RUN: %clang_cc1 -std=c89 -fsyntax-only -verify -pedantic -Wno-strict-prototypes %s a-tarasyuk wrote: @AaronBallman I've added additonal tests https://github.com/llvm/llvm-project/pull/134617 ___ cf

[clang] [Clang] add ext warning for missing return in 'main' for C89 mode (PR #134617)

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

[clang] [OpenACC][CIR] Basic infrastructure for OpenACC lowering (PR #134717)

2025-04-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/134717 This is the first of a few patches that will do infrastructure work to enable the OpenACC lowering via the OpenACC dialect. At the moment this just gets the various function calls that will end up generatin

[clang] [OpenACC][CIR] Basic infrastructure for OpenACC lowering (PR #134717)

2025-04-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes This is the first of a few patches that will do infrastructure work to enable the OpenACC lowering via the OpenACC dialect. At the moment this just gets the various function calls that will end up gener

[clang] [OpenACC][CIR] Basic infrastructure for OpenACC lowering (PR #134717)

2025-04-07 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 HEAD~1 HEAD --extensions cpp,h,c -- clang/lib/CIR/CodeGen/CIRGenOpenACCDecl.cpp clan

[clang] [clang][driver] Suppress gnu-line-marker when saving temps (PR #134621)

2025-04-07 Thread via cfe-commits
macurtis-amd wrote: > I am not sure clang driver should does this unusual suppression. > > You'd also get a warning with: `clang test.c -E -Wall -pedantic; clang test.i > -S -Wall -pedantic` > > There might be a different strategy to suppress this diagnostic? Did you have an alternative in mi

[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

2025-04-07 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: I've deployed that patch into ChromeOS, and now Intel, Qualcomm and Imagination are also failing. I need to have a closer look to see if anything can be changed in `clspv` to fix it, but I might end-up needing the fix mentioned a few weeks ago. https://github.com/llvm/llvm-pr

[clang] [Clang][OpenCL] Fix wait_for_event argument address space with -fdeclare-opencl-builtins (PR #134598)

2025-04-07 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh approved this pull request. LGTM, thanks for the fix! https://github.com/llvm/llvm-project/pull/134598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenCL] Fix wait_for_event argument address space with -fdeclare-opencl-builtins (PR #134598)

2025-04-07 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez closed https://github.com/llvm/llvm-project/pull/134598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 44e32fb - [Clang][OpenCL] Fix wait_for_event argument address space with -fdeclare-opencl-builtins (#134598)

2025-04-07 Thread via cfe-commits
Author: Juan Manuel Martinez Caamaño Date: 2025-04-07T10:44:37+02:00 New Revision: 44e32fb80272b77186b42c7583dd0ed8ad668af4 URL: https://github.com/llvm/llvm-project/commit/44e32fb80272b77186b42c7583dd0ed8ad668af4 DIFF: https://github.com/llvm/llvm-project/commit/44e32fb80272b77186b42c7583dd0ed

[clang-tools-extra] [clang-tidy][bugprone-unintended-char-ostream-output] add `WarnOnExplicitCast` option (PR #133639)

2025-04-07 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: I think it maybe not the correct way to resolve problem. closed it. https://github.com/llvm/llvm-project/pull/133639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][bugprone-unintended-char-ostream-output] add `WarnOnExplicitCast` option (PR #133639)

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

[clang] [Clang][ARM] Ensure FPU Features are parsed when targeting `cc1as` (PR #134612)

2025-04-07 Thread David Spickett via cfe-commits
@@ -0,0 +1,32 @@ +// REQUIRES: arm-registered-target +// Ensures that when targeting an ARM target with an Asm file, clang +// collects the features from the FPU. This is critical in the +// activation of NEON for supported targets. The Cortex-R52 will be +// used and tested for V

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

2025-04-07 Thread Aaron Ballman via cfe-commits
@@ -9753,27 +9753,46 @@ def err_operator_new_delete_invalid_result_type : Error< def err_operator_new_delete_dependent_result_type : Error< "%0 cannot have a dependent return type; use %1 instead">; def err_operator_new_delete_too_few_parameters : Error< - "%0 must have at l

[clang] [Clang][ARM] Ensure FPU Features are parsed when targeting `cc1as` (PR #134612)

2025-04-07 Thread David Spickett via cfe-commits
@@ -0,0 +1,32 @@ +// REQUIRES: arm-registered-target +// Ensures that when targeting an ARM target with an Asm file, clang +// collects the features from the FPU. This is critical in the +// activation of NEON for supported targets. The Cortex-R52 will be +// used and tested for V

[clang] [PowerPC] Update altivec.h to use __inline__ for c89 compatibility (PR #134430)

2025-04-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Thank you for the quick fix to that issue! https://github.com/llvm/llvm-project/pull/134430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Suppress gnu-line-marker when saving temps (PR #134621)

2025-04-07 Thread via cfe-commits
https://github.com/macurtis-amd created https://github.com/llvm/llvm-project/pull/134621 When passing `-save-temps` to clang, the generated preprocessed output uses gnu line markers. This unexpectedly triggers gnu-line-marker warnings when used with `-Weverything` or `-pedantic`. Even worse, c

[clang] [flang] [driver] Generalize the code that adds the path of libflang_rt.runtime.a. (PR #134362)

2025-04-07 Thread Daniel Chen via cfe-commits
DanielCChen wrote: > I think the static library should be the default (like libclang_rt.builtins). > Most uses will already use the static library unless they went into the > effort of building the shared library. Then, flang-rt and flang are > version-locked without a versioning scheme (`flan

[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

2025-04-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Not sure I get what is going on, but nothing suspicious/no real comments. https://github.com/llvm/llvm-project/pull/134461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

<    1   2   3   4   >