[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-06-17 Thread Vikash Gupta via cfe-commits
https://github.com/vg0204 created https://github.com/llvm/llvm-project/pull/95750 The __builtin_alloca was returning a flat pointer with no address space when compiled using openCL1.2 or below but worked fine with openCL2.0 and above. This accounts to the fact that later uses the concept of ge

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-06-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vikash Gupta (vg0204) Changes The __builtin_alloca was returning a flat pointer with no address space when compiled using openCL1.2 or below but worked fine with openCL2.0 and above. This accounts to the fact that later uses the concept o

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-06-17 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,86 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 %s -O0 -triple amdgcn-amd-amdhsa -cl-std=CL1.2 -emit-llvm -o - | FileCheck --check-prefix=OPENCL12 %s +// RUN: %clang_cc1 %s -O0 -triple amdg

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-06-17 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,86 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 %s -O0 -triple amdgcn-amd-amdhsa -cl-std=CL1.2 -emit-llvm -o - | FileCheck --check-prefix=OPENCL12 %s +// RUN: %clang_cc1 %s -O0 -triple amdg

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-17 Thread Matt Arsenault via cfe-commits
@@ -1764,6 +1764,13 @@ class TargetInfo : public TransferrableTargetInfo, return 0; } + /// \returns Target specific flat ptr address space; a flat ptr is a ptr that + /// can be casted to / from all other target address spaces. If the target + /// exposes no such add

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-06-17 Thread Balázs Kéri via cfe-commits
balazske wrote: I did not get crash with this script and latest clang. Probably there is a difference in the used system headers (`iostream` and `string` is included)? https://github.com/llvm/llvm-project/pull/87144 ___ cfe-commits mailing list cfe-co

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-17 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,17 @@ +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -fsyntax-only -verify -std=gnu++11 -triple amdgcn -Wno-unused-value %s + arsenm wrote: We probably want another similar sema test for OpenCL/HIP/OpenMP https://github.com/llvm/llvm-pro

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-17 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,9 @@ + arsenm wrote: Extra blank line https://github.com/llvm/llvm-project/pull/94830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-17 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,84 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature + // REQUIRES: amdgpu-registered-target + // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu verde -emit-llvm -o - %s | FileCheck %s + // RUN

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-17 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,84 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature + // REQUIRES: amdgpu-registered-target + // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu verde -emit-llvm -o - %s | FileCheck %s + // RUN

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-17 Thread via cfe-commits
zmodem wrote: > Sweep `condbitmap.update`, since it is no longer used. It's used by Rust: https://github.com/rust-lang/rust/blob/fd7eefc2753e867053a1c567a7b504ae308e3f85/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp#L1581 What's the migration path? Could you put something in the release not

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-06-17 Thread Vikash Gupta via cfe-commits
@@ -0,0 +1,86 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 %s -O0 -triple amdgcn-amd-amdhsa -cl-std=CL1.2 -emit-llvm -o - | FileCheck --check-prefix=OPENCL12 %s +// RUN: %clang_cc1 %s -O0 -triple amdg

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-06-17 Thread Vikash Gupta via cfe-commits
@@ -0,0 +1,86 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 %s -O0 -triple amdgcn-amd-amdhsa -cl-std=CL1.2 -emit-llvm -o - | FileCheck --check-prefix=OPENCL12 %s +// RUN: %clang_cc1 %s -O0 -triple amdg

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread Vlad Serebrennikov via cfe-commits
@@ -1145,8 +1145,10 @@ namespace cwg181 { // cwg181: yes namespace X { template > struct A { }; // expected-error@-1 +{{}} +// expected-note@-2 {{did you mean to use 'typename'?}} template > void f(A) { } // expected-error@-1 +{{}} +// expected-n

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread Vlad Serebrennikov via cfe-commits
@@ -1145,8 +1145,10 @@ namespace cwg181 { // cwg181: yes namespace X { template > struct A { }; // expected-error@-1 +{{}} +// expected-note@-2 {{did you mean to use 'typename'?}} Endilll wrote: ```suggestion // expected-note@-2 {{did you

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to DR tests look fine. https://github.com/llvm/llvm-project/pull/95726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/95726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-06-17 Thread Vikash Gupta via cfe-commits
https://github.com/vg0204 edited https://github.com/llvm/llvm-project/pull/95750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-17 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @zmodem Thanks for the notification. I supposed release notes may be updated just before the release. I was wondering how I could propagate changes. I will fill recent changes to Release notes, later. Re. condbitmap.update, it has become useless after #82448 . I think pruning it

[clang] [Debug Info] Fix debug info ptr to ptr test (PR #95637)

2024-06-17 Thread Jeremy Morse via cfe-commits
jmorse wrote: @huangjd Thanks for the fix -- FYI it's acceptable to commit patches like this without review (and leave a comment on the original PR) if you wanted to. Given that it's just the format of the test changing, not any of the meaning, it's an "obvious" fix. https://github.com/llvm/l

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-06-17 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,86 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 %s -O0 -triple amdgcn-amd-amdhsa -cl-std=CL1.2 -emit-llvm -o - | FileCheck --check-prefix=OPENCL12 %s +// RUN: %clang_cc1 %s -O0 -triple amdg

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-17 Thread via cfe-commits
@@ -222,18 +222,13 @@ static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, return S.Diag(Loc, diag::warn_unused_result_msg) << A << Msg << R1 << R2; } -void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { - const unsigned OrigDiagID = Diag

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/95112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-17 Thread via cfe-commits
@@ -222,18 +222,13 @@ static bool DiagnoseNoDiscard(Sema &S, const WarnUnusedResultAttr *A, return S.Diag(Loc, diag::warn_unused_result_msg) << A << Msg << R1 << R2; } -void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { - const unsigned OrigDiagID = Diag

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-17 Thread via cfe-commits
@@ -171,21 +187,3 @@ void f() { #endif } } // namespace discarded_member_access - - -// cxx11-warning@5 {{use of the 'nodiscard' attribute is a C++17 extension}} -// cxx11-warning@9 {{use of the 'nodiscard' attribute is a C++17 extension}} -// cxx11-warning@12 {{use of the 'nod

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. A few more minor things, but LGTM otherwise. https://github.com/llvm/llvm-project/pull/95112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [Clang] disallow non-lvalue values in constant expressions to prevent invalid pointer offset computation (PR #95479)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/95479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow non-lvalue values in constant expressions to prevent invalid pointer offset computation (PR #95479)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. There’s a typo in the release notes, but everything else lg. https://github.com/llvm/llvm-project/pull/95479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Clang] disallow non-lvalue values in constant expressions to prevent invalid pointer offset computation (PR #95479)

2024-06-17 Thread via cfe-commits
@@ -858,6 +858,8 @@ Bug Fixes to C++ Support - Fixed several bugs in capturing variables within unevaluated contexts. (#GH63845), (#GH67260), (#GH69307), (#GH88081), (#GH89496), (#GH90669) and (#GH91633). - Fixed handling of brace ellison when building deduction guides. (#GH

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-06-17 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70307 From 0ed347381cdd9e639ab5026dcf244ca4d7fcb6e3 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Thu, 26 Oct 2023 10:39:52 +0200 Subject: [PATCH] [clang] Emit bad shift warnings ---

[clang] [Clang] fix access checking inside return-type-requirement of compound requirements (PR #95651)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-17 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/95224 >From d5caa1a22c90c7d3b1fd995c3ae980f02e4c14c9 Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Wed, 12 Jun 2024 11:13:48 + Subject: [PATCH 1/3] fix for mve --- clang/lib/Sema/SemaType.cpp|

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-17 Thread via cfe-commits
@@ -1,7 +1,8 @@ -// RUN: %clang_cc1 %s -triple armv7 -fsyntax-only -verify -// RUN: %clang_cc1 %s -triple aarch64 -fsyntax-only -verify -// RUN: %clang_cc1 %s -triple aarch64 -target-feature -fp-armv8 -target-abi aapcs-soft -fsyntax-only -verify +// RUN: %clang_cc1 %s -triple arm

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-17 Thread via cfe-commits
zmodem wrote: > Re. condbitmap.update, it has become useless after #82448 . I think pruning > it will be the possible way. Can you expand on this? I'm not familiar with these intrinsics at all. What are users who were using `condbitmap.update` supposed to call now? https://github.com/llvm/llv

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-17 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/95224 >From d5caa1a22c90c7d3b1fd995c3ae980f02e4c14c9 Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Wed, 12 Jun 2024 11:13:48 + Subject: [PATCH 1/4] fix for mve --- clang/lib/Sema/SemaType.cpp|

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM as well. https://github.com/llvm/llvm-project/pull/95718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/95718 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

2024-06-17 Thread via cfe-commits
@@ -166,6 +166,55 @@ QualType CXXTypeidExpr::getTypeOperand(ASTContext &Context) const { Operand.get()->getType().getNonReferenceType(), Quals); } +namespace { +static bool isGLValueFromPointerDeref(const Expr *E) { Sirraide wrote: Pretty sure `namespa

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-17 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Oh, I didn't realize you were eager to land this in Clang 19, thanks for sharing that. In that case, I think a specialiazed hash function for `GlobalDeclID` is indeed the way to go. I was also worried a little there are other performance implications of this change that w

[clang] [Serialization] Use specialized decl hash function for GlobalDeclID (PR #95730)

2024-06-17 Thread Ilya Biryukov via cfe-commits
@@ -230,7 +230,11 @@ template <> struct DenseMapInfo { } static unsigned getHashValue(const GlobalDeclID &Key) { -return DenseMapInfo::getHashValue(Key.get()); +// Our default hash algorithm for 64 bits integer may not be very good. +// In GlobalDeclID's case,

[clang] [Clang] Introduce `CXXTypeidExpr::hasNullCheck` (PR #95718)

2024-06-17 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/95718 >From c3912611dd63f81ea7067a4b26ef5450f6f01f75 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 16 Jun 2024 22:35:38 +0100 Subject: [PATCH 1/3] [Clang] Introduce CXXTypeidExpr::hasNullCheck --- clang/do

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/95726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide commented: This does seem like a nice qoi improvement. https://github.com/llvm/llvm-project/pull/95726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
@@ -787,6 +787,23 @@ NamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { assert(Tok.is(tok::kw_template) && "Expected 'template' keyword"); + if (Token ahead = GetLookAheadToken(1); +

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 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 9f69e116a55dbd36e2f4fde38317de7262c88d7c 44620330cd5238de549d3d77ddc447cd3bc51e60 --

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-06-17 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/15] Enforce SL.con.3: Add check to replace operator[] with at() o

[clang] [NFC] Refactor `[[nodiscard]]` test to not use macros and run under `-pedantic` (PR #95762)

2024-06-17 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/95762 None >From fd52c588543a44a71652d7dbabc563777ebe4437 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 17 Jun 2024 11:15:16 +0100 Subject: [PATCH] [NFC] Refactor `[[nodiscard]]` test to not use macros and

[clang] [NFC] Refactor `[[nodiscard]]` test to not use macros and run under `-pedantic` (PR #95762)

2024-06-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/95762.diff 1 Files Affected: - (modified) clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp (+27-35) ``diff diff --git a/clang

[clang] [NFC] Refactor `[[nodiscard]]` test to not use macros and run under `-pedantic` (PR #95762)

2024-06-17 Thread Mital Ashok via cfe-commits
MitalAshok wrote: CC @AaronBallman @Sirraide More tests will be added in https://github.com/llvm/llvm-project/pull/95112/files#diff-50c6ce984d17856a8b61d98f625dacec78bfbbe01d2e9fbab80b27c771e3db99R144 but these changes are unrelated enough to warrant a separate patch https://github.com/llvm/l

[clang] [NFC] Refactor `[[nodiscard]]` test to not use macros and run under `-pedantic` (PR #95762)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-17 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @zmodem #82448 doesn't use intermediate condbitmap but integer index. I decided not to modify and use the intrinsic `condbitmapupdate`, since the signature will be quite different and this is too simple to be put into the intrinsic. Also pre-#82448 impl of `condbitmapupdate` was

[clang] [Clang] Forward -rpath flag in the correct format in CPU offloading (PR #95763)

2024-06-17 Thread via cfe-commits
https://github.com/mikaoP created https://github.com/llvm/llvm-project/pull/95763 `clang-linker-wrapper` gets flags in linker format. In CPU offloading we need to format some of them as compiler flags, like it is already done with `--no-whole-archine`. This patch does the same with `-rpath` >

[clang] [Clang] Forward -rpath flag in the correct format in CPU offloading (PR #95763)

2024-06-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (mikaoP) Changes `clang-linker-wrapper` gets flags in linker format. In CPU offloading we need to format some of them as compiler flags, like it is already done with `--no-whole-archine`. This patch does the same with `-rpath`

[clang] [Clang] Forward -rpath flag in the correct format in CPU offloading (PR #95763)

2024-06-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (mikaoP) Changes `clang-linker-wrapper` gets flags in linker format. In CPU offloading we need to format some of them as compiler flags, like it is already done with `--no-whole-archine`. This patch does the same with `-rpath` --- F

[clang] [clang][CodeGen] Fix EmitInvariantStart for non-zero addrspace (PR #94346)

2024-06-17 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: @efriedma-quic Thanks for the review! Could you merge this request on our behalf? (No commit access) https://github.com/llvm/llvm-project/pull/94346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [Clang] Forward -rpath flag in the correct format in CPU offloading (PR #95763)

2024-06-17 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 657ec7320d8a28171755ba0dd5afc570a5a16791 eb1145aa4faea37806780823cc55daaba1340f36 --

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-06-17 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/16] Enforce SL.con.3: Add check to replace operator[] with at() o

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-06-17 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,123 @@ +//===--- PreferAtOverSubscriptOperatorCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Clang] Forward -rpath flag in the correct format in CPU offloading (PR #95763)

2024-06-17 Thread via cfe-commits
https://github.com/mikaoP updated https://github.com/llvm/llvm-project/pull/95763 >From 9710628fb49e941bc43b1a4fb11a9d03470b8d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Pe=C3=B1acoba=20Veigas?= Date: Mon, 17 Jun 2024 10:34:10 + Subject: [PATCH] [Clang] Forward -rpath flag in th

[clang] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below (PR #95750)

2024-06-17 Thread Vikash Gupta via cfe-commits
https://github.com/vg0204 updated https://github.com/llvm/llvm-project/pull/95750 >From 04ff7bd289d0840b8aa2b0502e4ac050174c95ab Mon Sep 17 00:00:00 2001 From: vg0204 Date: Mon, 17 Jun 2024 11:20:02 +0530 Subject: [PATCH 1/2] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below

[clang] [Clang] Forward -rpath flag to the correct format in CPU offloading (PR #95763)

2024-06-17 Thread via cfe-commits
https://github.com/mikaoP edited https://github.com/llvm/llvm-project/pull/95763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Fix linking issues in static map initializers (PR #91310)

2024-06-17 Thread Nick Zavaritsky via cfe-commits
mejedi wrote: ping https://github.com/llvm/llvm-project/pull/91310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-06-17 Thread Julian Schmidt via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heide

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
@@ -787,6 +787,23 @@ NamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { assert(Tok.is(tok::kw_template) && "Expected 'template' keyword"); + if (Token ahead = GetLookAheadToken(1); +

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
https://github.com/Veeloxfire updated https://github.com/llvm/llvm-project/pull/95726 >From 44620330cd5238de549d3d77ddc447cd3bc51e60 Mon Sep 17 00:00:00 2001 From: Veeloxfire <58116051+veeloxf...@users.noreply.github.com> Date: Mon, 17 Jun 2024 01:20:32 +0100 Subject: [PATCH 1/3] [clang][Parser]

[clang] [clang][Interp] Implement complex division (PR #94892)

2024-06-17 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/94892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement Complex-complex multiplication (PR #94891)

2024-06-17 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/94891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6d973b4 - [clang][CodeGen] Return RValue from `EmitVAArg` (#94635)

2024-06-17 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2024-06-17T13:29:20+02:00 New Revision: 6d973b4548e281d0b8e75e85833804bb45b6a0e8 URL: https://github.com/llvm/llvm-project/commit/6d973b4548e281d0b8e75e85833804bb45b6a0e8 DIFF: https://github.com/llvm/llvm-project/commit/6d973b4548e281d0b8e75e85833804bb45b6a0

[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)

2024-06-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/94635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c2d9f25 - [clang][CodeGen] Fix EmitInvariantStart for non-zero addrspace (#94346)

2024-06-17 Thread via cfe-commits
Author: Bruno De Fraine Date: 2024-06-17T07:30:10-04:00 New Revision: c2d9f253e5a4074bb965e483cca2fe968b78693c URL: https://github.com/llvm/llvm-project/commit/c2d9f253e5a4074bb965e483cca2fe968b78693c DIFF: https://github.com/llvm/llvm-project/commit/c2d9f253e5a4074bb965e483cca2fe968b78693c.dif

[clang] [clang][CodeGen] Fix EmitInvariantStart for non-zero addrspace (PR #94346)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/94346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
https://github.com/Veeloxfire updated https://github.com/llvm/llvm-project/pull/95726 >From 44620330cd5238de549d3d77ddc447cd3bc51e60 Mon Sep 17 00:00:00 2001 From: Veeloxfire <58116051+veeloxf...@users.noreply.github.com> Date: Mon, 17 Jun 2024 01:20:32 +0100 Subject: [PATCH 1/4] [clang][Parser]

[clang] [Clang] disallow non-lvalue values in constant expressions to prevent invalid pointer offset computation (PR #95479)

2024-06-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/95479 >From 125d9cdd617d6415ef24eb785fe22705149f2d01 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 14 Jun 2024 01:26:34 +0300 Subject: [PATCH 1/5] [Clang] disallow non-lvalue values in constant expressions

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
Veeloxfire wrote: Sorry for the extra reformatting commit, I somehow missed the original formatting suggestions (I dont know how I didnt notice the 1 space indent originally) https://github.com/llvm/llvm-project/pull/95726 ___ cfe-commits mailing lis

[clang] [Clang] skip alignment checks on incomplete types to avoid an assertion failure while parsing lambda used as default argument (PR #94542)

2024-06-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/94542 >From da4df73607a9edefc8db721818eff50e974a0637 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 6 Jun 2024 01:55:54 +0300 Subject: [PATCH] [Clang] skip alignment checks on incomplete types to avoid an as

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/95726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM after fixing two more minor things I only noticed just now. Also, this needs a release note (in `clang/docs/ReleaseNotes.rst`, probably in the section ‘Improvements to Clang’s Diagnostics’ or whatever it was called). https://github.c

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
@@ -787,6 +787,20 @@ NamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { assert(Tok.is(tok::kw_template) && "Expected 'template' keyword"); + if (Token ahead = GetLookAheadToken(1); ahead.

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
@@ -787,6 +787,20 @@ NamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { assert(Tok.is(tok::kw_template) && "Expected 'template' keyword"); + if (Token ahead = GetLookAheadToken(1); ahead.

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
@@ -787,6 +787,20 @@ NamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { assert(Tok.is(tok::kw_template) && "Expected 'template' keyword"); + if (Token ahead = GetLookAheadToken(1); ahead.

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
@@ -787,6 +787,20 @@ NamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { assert(Tok.is(tok::kw_template) && "Expected 'template' keyword"); + if (Token ahead = GetLookAheadToken(1); ahead.

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-17 Thread Alex Voicu via cfe-commits
@@ -1764,6 +1764,13 @@ class TargetInfo : public TransferrableTargetInfo, return 0; } + /// \returns Target specific flat ptr address space; a flat ptr is a ptr that + /// can be casted to / from all other target address spaces. If the target + /// exposes no such add

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-17 Thread Michael Buch via cfe-commits
Michael137 wrote: > > > The correct answer here is probably to fix the sizes in the RecordLayout > > > itself; in particular, the DataSize of the members. > > > > > > That would be ideal, but also means we'd have to reflect the various C++ > > attributes that affect layout in DWARF. Avoiding

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
@@ -787,6 +787,20 @@ NamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { assert(Tok.is(tok::kw_template) && "Expected 'template' keyword"); + if (Token ahead = GetLookAheadToken(1); ahead.

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
@@ -787,6 +787,20 @@ NamedDecl *Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { assert(Tok.is(tok::kw_template) && "Expected 'template' keyword"); + if (Token ahead = GetLookAheadToken(1); ahead.

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-17 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/95728 >From 2b500ad9ef2baf27da29146b5a4123dcb75e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 17 Jun 2024 02:15:00 +0100 Subject: [PATCH 1/2] Add interface for exposing a target's flat address space, if it

[clang-tools-extra] [clangd] Add inlay hints for default function arguments and implicit lambda captures (PR #95712)

2024-06-17 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Aha, that's a great suggestion. I agree that beyond the trivial case of 2 captured variables it gets a bit noisy. On-hover would be quite nice though! To clarify, you mean hovering over the default capture '=' or '&' right? I'm happy to remove the lambdas from this PR in fav

[clang-tools-extra] [clangd] Add inlay hints for default function arguments and implicit lambda captures (PR #95712)

2024-06-17 Thread Tor Shepherd via cfe-commits
@@ -15,9 +15,12 @@ #include "support/Context.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/ScopedPrinter.h" +#include "llvm/Support/raw_ostream.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include #include +#include torshepherd wrote

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
https://github.com/Veeloxfire updated https://github.com/llvm/llvm-project/pull/95726 >From 44620330cd5238de549d3d77ddc447cd3bc51e60 Mon Sep 17 00:00:00 2001 From: Veeloxfire <58116051+veeloxf...@users.noreply.github.com> Date: Mon, 17 Jun 2024 01:20:32 +0100 Subject: [PATCH 1/5] [clang][Parser]

[clang-tools-extra] [clangd] Add inlay hints for default function arguments and implicit lambda captures (PR #95712)

2024-06-17 Thread Tor Shepherd via cfe-commits
@@ -1458,13 +1463,66 @@ TEST(TypeHints, DefaultTemplateArgs) { struct A {}; A foo(); auto $var[[var]] = foo(); -A bar[1]; +A baz; +A bar[1]{}; torshepherd wrote: My fault, an artifact from a different set of inlay hints I decided not to

[clang-tools-extra] [clangd] Add inlay hints for default function arguments and implicit lambda captures (PR #95712)

2024-06-17 Thread Tor Shepherd via cfe-commits
@@ -1568,7 +1626,7 @@ TEST(TypeHints, SubstTemplateParameterAliases) { )cpp"; llvm::StringRef VectorIntPtr = R"cpp( -vector array; +vector $init[[array]]; torshepherd wrote: Another artifact, sorry https://github.com/llvm/llvm-project/pull/95712

[clang-tools-extra] [clangd] Add inlay hints for default function arguments and implicit lambda captures (PR #95712)

2024-06-17 Thread Tor Shepherd via cfe-commits
@@ -504,10 +503,10 @@ struct FragmentCompiler { auto Fast = isFastTidyCheck(Str); if (!Fast.has_value()) { diag(Warning, - llvm::formatv( - "Latency of clang-tidy check '{0}' is not known. " - "It will only run if

[clang] [llvm] [AMDGPU][WIP] Extend permlane16, permlanex16 and permlane64 intrinsic lowering for generic types (PR #92725)

2024-06-17 Thread Vikram Hegde via cfe-commits
@@ -18479,6 +18479,28 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_update_dpp, Args[0]->getType()); return Builder.CreateCall(F, Args); } + case AMDGPU::BI__builtin_amdgcn_permlane16: + case AMDGPU::BI_

[clang] [Serialization] Use specialized decl hash function for GlobalDeclID (PR #95730)

2024-06-17 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/95730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Use specialized decl hash function for GlobalDeclID (PR #95730)

2024-06-17 Thread Ilya Biryukov via cfe-commits
@@ -230,7 +230,11 @@ template <> struct DenseMapInfo { } static unsigned getHashValue(const GlobalDeclID &Key) { -return DenseMapInfo::getHashValue(Key.get()); +// Our default hash algorithm for 64 bits integer may not be very good. ilya-biryukov w

[clang] [llvm] [AMDGPU][WIP] Extend permlane16, permlanex16 and permlane64 intrinsic lowering for generic types (PR #92725)

2024-06-17 Thread Vikram Hegde via cfe-commits
vikramRH wrote: Updated this PR to be in sync with #89217, However still plan is to land this land this only after changes in #89217 are accepted. https://github.com/llvm/llvm-project/pull/92725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clangd] Add inlay hints for default function arguments and implicit lambda captures (PR #95712)

2024-06-17 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > To clarify, you mean hovering over the default capture '=' or '&' right? Yep, that's what I thought. > I'm happy to remove the lambdas from this PR in favor of the hover approach. No worries, but let's wait for other reviewers' opinions before we move forward. :) https://git

[clang] [clang][Parser] "Better" error messages for invalid template template (PR #95726)

2024-06-17 Thread via cfe-commits
Veeloxfire wrote: > Also, this needs a release note (in `clang/docs/ReleaseNotes.rst`, probably > in the section ‘Improvements to Clang’s Diagnostics’ or whatever it was > called). So I dont end up making 100 commits rewording this: How about "Clang now diagnoses template template paramter mis

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-06-17 Thread Paul Heidekrüger via cfe-commits
https://github.com/PBHDK updated https://github.com/llvm/llvm-project/pull/95220 From 37292995de0c5aa87408586749795a97468d4725 Mon Sep 17 00:00:00 2001 From: Sebastian Wolf Date: Wed, 17 Apr 2024 16:16:35 +0200 Subject: [PATCH 01/17] Enforce SL.con.3: Add check to replace operator[] with at() o

  1   2   3   4   5   >