[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-16 Thread via cfe-commits
cor3ntin wrote: @joanahalili > We are seeing a widespread breakage due to this commit and could use having > the flag -fno-relaxed-template-template-args un-deprecated for a while. This > would help do a cleanup on our end. Can you provide more information? How widespread are we talking about

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-05-16 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I'm not sure a crash is ever expected, but it's a known issue. https://github.com/llvm/llvm-project/pull/73376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-16 Thread Saiyedul Islam via cfe-commits
saiislam wrote: Thanks for the review and comments. Closing the PR. https://github.com/llvm/llvm-project/pull/92290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-16 Thread Saiyedul Islam via cfe-commits
https://github.com/saiislam closed https://github.com/llvm/llvm-project/pull/92290 ___ 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 CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-16 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/92266 >From eeb24ddbf261fd7667dd05feee14637bc379d182 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Wed, 15 May 2024 16:02:07 +0200 Subject: [PATCH 1/3] Fix CXXNewExpr end source location for 'new struct S' --

[clang] [clang-tools-extra] [clang] Fix CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-16 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -ast-dump %s 2>&1 | FileCheck %s necto wrote: thanks for the pointer, moved! https://github.com/llvm/llvm-project/pull/92266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [clang] Fix CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-16 Thread Arseniy Zaostrovnykh via cfe-commits
necto wrote: > `clang-tidy/checkers/modernize/make-unique.cpp` is failing for whatever > reason. Otherwise LGTM. Indeed, turns out this PR fixes #35300 https://github.com/llvm/llvm-project/pull/92266 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [clang-tools-extra] [clang] Fix CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-16 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/92266 >From eeb24ddbf261fd7667dd05feee14637bc379d182 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Wed, 15 May 2024 16:02:07 +0200 Subject: [PATCH 1/3] Fix CXXNewExpr end source location for 'new struct S' --

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C cor3ntin wrote: As it turns out, GCC does support GNU-style attributes https://compiler-e

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/92295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-05-16 Thread Azat Khuzhin via cfe-commits
azat wrote: >[Build and Test libc++ / stage3 (generic-ubsan, libcxx-runners-8-set) >(pull_request) Failing after >10m](https://github.com/llvm/llvm-project/actions/runs/9099207645/job/25013031369?pr=92291) Looks like unrelated? ``` 2024-05-15T17:48:22.3468783Z ##[error]The runner has received

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/92318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-16 Thread Shengchen Kan via cfe-commits
@@ -450,6 +450,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector &Features, HasFullBFloat16 = true; } else if (Feature == "+egpr") { HasEGPR = true; +} else if (Feature == "+inline-asm-use-gpr32") { KanRobert wrote: Will the featur

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-16 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert edited https://github.com/llvm/llvm-project/pull/92338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-16 Thread Shengchen Kan via cfe-commits
@@ -450,6 +450,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector &Features, HasFullBFloat16 = true; } else if (Feature == "+egpr") { HasEGPR = true; +} else if (Feature == "+inline-asm-use-gpr32") { KanRobert wrote: > `mcmodel` may

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/91306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/91306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang-codegen Author: Nikolas Klauser (philnik777) Changes This is also very useful for generic code. For example this would allow libc++ to vectorize `{min,max,minmax}_element` without having

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: I don't understand why the order of emitted instructions changes based on how exactly Clang is compiled, but other than that this should be ready. Hopefully someone spots what the problem could be. https://github.com/llvm/llvm-project/pull/91306 __

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-16 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/91445 From d839faf7a30851a172d812137b30635c741870f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Wed, 8 May 2024 10:10:24 +0200 Subject: [PATCH 1/8] [clang][analyzer] Add checker 'Security

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-16 Thread Freddy Ye via cfe-commits
@@ -450,6 +450,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector &Features, HasFullBFloat16 = true; } else if (Feature == "+egpr") { HasEGPR = true; +} else if (Feature == "+inline-asm-use-gpr32") { FreddyLeaf wrote: > Will the fea

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/86512 >From 10d06e728d836f4aaad7dbf1a6b06b57e4092bb1 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 25 Mar 2024 15:10:51 +0100 Subject: [PATCH 1/3] [clang] Implement a bitwise_copyable builtin type trait. This pa

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/86512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-16 Thread Haojian Wu via cfe-commits
@@ -3958,6 +3958,50 @@ Note that the `size` argument must be a compile time constant. Note that this intrinsic cannot yet be called in a ``constexpr`` context. +``__is_bitwise_cloneable`` +- + +A type trait is used to check whether a type can be safel

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: thanks for the review. https://github.com/llvm/llvm-project/pull/86512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-16 Thread Haojian Wu via cfe-commits
@@ -2718,6 +2718,36 @@ bool QualType::isTriviallyCopyableType(const ASTContext &Context) const { /*IsCopyConstructible=*/false); } +bool QualType::isBitwiseCloneableType(const ASTContext & Context) const { + QualType CanonicalType = getCa

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-16 Thread Haojian Wu via cfe-commits
@@ -2718,6 +2718,36 @@ bool QualType::isTriviallyCopyableType(const ASTContext &Context) const { /*IsCopyConstructible=*/false); } +bool QualType::isBitwiseCloneableType(const ASTContext & Context) const { + QualType CanonicalType = getCa

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-16 Thread Haojian Wu via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s + +// Scalar types are bitwise clonable. +static_assert(__is_bitwise_cloneable(int)); +static_assert(__is_bitwise_cloneable(int*)); +// array +static_assert(__is_bitwise_cloneable(int[10])); + +// non-scalar

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-16 Thread Haojian Wu via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s + +// Scalar types are bitwise clonable. +static_assert(__is_bitwise_cloneable(int)); +static_assert(__is_bitwise_cloneable(int*)); +// array +static_assert(__is_bitwise_cloneable(int[10])); + +// non-scalar

[clang] [AST] RecursiveASTVisitor: Don't traverse the alias deduction guides in the default mode. (PR #91454)

2024-05-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/91454 >From e560fe2bf2d4bdc07a71682aa4d3a4bee8730b80 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 8 May 2024 12:11:10 +0200 Subject: [PATCH 1/2] [AST] RecursiveASTVisitor: Don't traverse the alias deduction gui

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-16 Thread Shengchen Kan via cfe-commits
@@ -450,6 +450,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector &Features, HasFullBFloat16 = true; } else if (Feature == "+egpr") { HasEGPR = true; +} else if (Feature == "+inline-asm-use-gpr32") { KanRobert wrote: > > Will the fe

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-16 Thread Freddy Ye via cfe-commits
@@ -450,6 +450,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector &Features, HasFullBFloat16 = true; } else if (Feature == "+egpr") { HasEGPR = true; +} else if (Feature == "+inline-asm-use-gpr32") { FreddyLeaf wrote: SSELevel relie

[clang] [clang-tools-extra] [clang] Fix CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. thanks, still good. https://github.com/llvm/llvm-project/pull/92266 ___ 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 CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-16 Thread Haojian Wu via cfe-commits
@@ -583,3 +583,8 @@ void NonADLCall3() { f(x); } } // namespace test_adl_call_three + hokein wrote: nit: wrap the code within `namespace GH35300 { ...}`. https://github.com/llvm/llvm-project/pull/92266 ___ cfe-com

[clang] [clang-tools-extra] [clang] Fix CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/92266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-16 Thread Freddy Ye via cfe-commits
@@ -450,6 +450,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector &Features, HasFullBFloat16 = true; } else if (Feature == "+egpr") { HasEGPR = true; +} else if (Feature == "+inline-asm-use-gpr32") { FreddyLeaf wrote: > > > Will the

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-16 Thread Shengchen Kan via cfe-commits
@@ -450,6 +450,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector &Features, HasFullBFloat16 = true; } else if (Feature == "+egpr") { HasEGPR = true; +} else if (Feature == "+inline-asm-use-gpr32") { KanRobert wrote: > SSELevel reli

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-16 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert edited https://github.com/llvm/llvm-project/pull/92338 ___ 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 CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-16 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/92266 >From eeb24ddbf261fd7667dd05feee14637bc379d182 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Wed, 15 May 2024 16:02:07 +0200 Subject: [PATCH 1/4] Fix CXXNewExpr end source location for 'new struct S' --

[clang] [clang-tools-extra] [clang] Fix CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-16 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -583,3 +583,8 @@ void NonADLCall3() { f(x); } } // namespace test_adl_call_three + necto wrote: Done https://github.com/llvm/llvm-project/pull/92266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Simon Pilgrim via cfe-commits
@@ -3019,6 +3019,26 @@ C-style cast applied to each element of the first argument. Query for this feature with ``__has_builtin(__builtin_convertvector)``. +``__builtin_selectvector`` +-- + +``__builtin_selectvector`` is used to express generic vector

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Simon Pilgrim via cfe-commits
@@ -232,225 +232,225 @@ typedef char __v2qi __attribute__((__vector_size__(2))); static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_mask_add_epi32(__m256i __W, __mmask8 __U, __m256i __A, __m256i __B) { - return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U, -

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: constexpr handling? https://github.com/llvm/llvm-project/pull/91306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix P2564 handling of variable initializers (PR #89565)

2024-05-16 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @katzdm It seems after this a `warn_impcast_integer_precision_constant` warning went missing: https://godbolt.org/z/ndsPb44b4 Is that expected? https://github.com/llvm/llvm-project/pull/89565 ___ cfe-commits mailing list cfe-commit

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-16 Thread Matt Arsenault via cfe-commits
@@ -243,11 +243,16 @@ def VOP_READFIRSTLANE : VOPProfile <[i32, i32, untyped, untyped]> { // FIXME: Specify SchedRW for READFIRSTLANE_B32 // TODO: There is VOP3 encoding also def V_READFIRSTLANE_B32 : VOP1_Pseudo <"v_readfirstlane_b32", VOP_READFIRSTLANE, -

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-16 Thread Matt Arsenault via cfe-commits
@@ -780,14 +780,22 @@ defm V_SUBREV_U32 : VOP2Inst <"v_subrev_u32", VOP_I32_I32_I32_ARITH, null_frag, // These are special and do not read the exec mask. let isConvergent = 1, Uses = [] in { -def V_READLANE_B32 : VOP2_Pseudo<"v_readlane_b32", VOP_READLANE, - [(set i32:$vdst,

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-16 Thread Tomasz Stanisławski via cfe-commits
@@ -7274,12 +7274,19 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, // init a VLA in C++ in all cases (such as with non-trivial constructors). // FIXME: should we allow this construct in C++ when it makes sense to do // so

[clang] [Clang][Sema] Fix last argument not being used when comparing function template specializations when one has an explicit object argument (PR #92263)

2024-05-16 Thread Mital Ashok via cfe-commits
@@ -5591,7 +5592,11 @@ FunctionTemplateDecl *Sema::getMoreSpecializedTemplate( IsRValRef1); Args2.push_back(Obj2Ty); } -size_t NumComparedArguments = NumCallArguments1 + ShouldConvert1; +size_t NumComparedArguments

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-16 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?=, Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: @@ -7274,12 +7274,19 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, // init

[clang] 1795fa5 - [NFC] Update example in comment

2024-05-16 Thread via cfe-commits
Author: Sirraide Date: 2024-05-16T12:08:39+02:00 New Revision: 1795fa58bac5092f758bf27e1b27a2b07bab URL: https://github.com/llvm/llvm-project/commit/1795fa58bac5092f758bf27e1b27a2b07bab DIFF: https://github.com/llvm/llvm-project/commit/1795fa58bac5092f758bf27e1b27a2b07bab.diff LOG:

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-16 Thread via cfe-commits
Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?=, Jim M. R. =?utf-8?q?Teichgräber?=,Jim M. R. =?utf-8?q?Teichgräber?Message-ID: In-Reply-To: @@ -7274,12 +7274,19 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, // init

[clang] 5ffd154 - [analyzer] Clean up list of taint propagation functions (#91635)

2024-05-16 Thread via cfe-commits
Author: Donát Nagy Date: 2024-05-16T12:10:56+02:00 New Revision: 5ffd154cf61390c1ed32a1b0eb134929f78c0fbe URL: https://github.com/llvm/llvm-project/commit/5ffd154cf61390c1ed32a1b0eb134929f78c0fbe DIFF: https://github.com/llvm/llvm-project/commit/5ffd154cf61390c1ed32a1b0eb134929f78c0fbe.diff LO

[clang] [analyzer] Clean up list of taint propagation functions (PR #91635)

2024-05-16 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/91635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][c++20] Fix code coverage mapping crash with generalized NTTPs (PR #85837)

2024-05-16 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a updated https://github.com/llvm/llvm-project/pull/85837 >From 61abd7b6089ecb87eaf6886e251969d4db87e223 Mon Sep 17 00:00:00 2001 From: Bolshakov Date: Tue, 19 Mar 2024 19:05:36 +0300 Subject: [PATCH 1/2] [clang][c++20] Fix code coverage mapping crash with generali

[clang-tools-extra] ba2e4fe - [clang] Fix CXXNewExpr end source location for 'new struct S' (#92266)

2024-05-16 Thread via cfe-commits
Author: Arseniy Zaostrovnykh Date: 2024-05-16T12:14:53+02:00 New Revision: ba2e4fe4e7f79e49fcac54ea20f5b899dc687cfc URL: https://github.com/llvm/llvm-project/commit/ba2e4fe4e7f79e49fcac54ea20f5b899dc687cfc DIFF: https://github.com/llvm/llvm-project/commit/ba2e4fe4e7f79e49fcac54ea20f5b899dc687cf

[clang] [clang-tools-extra] [clang] Fix CXXNewExpr end source location for 'new struct S' (PR #92266)

2024-05-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/92266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-16 Thread via cfe-commits
Sirraide wrote: @dougsonos Btw, feel free to remind reviewers that this pr exists every week or so if no-one reviews it. Just adding a comment with the text ‘ping’ is how we usually handle that. https://github.com/llvm/llvm-project/pull/84983 ___ cfe

[clang] [clang] Disallow VLA type compound literals (PR #91891)

2024-05-16 Thread Jim M . R . Teichgräber via cfe-commits
@@ -7274,12 +7274,19 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, // init a VLA in C++ in all cases (such as with non-trivial constructors). // FIXME: should we allow this construct in C++ when it makes sense to do // so

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/3] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,38 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #cwg2428-C + +template +[[deprecated]] concept C2 = true; +// expected-error@-1 {{expected unqualified-id}} +

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Phoebe Wang via cfe-commits
@@ -3744,6 +3744,12 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return RValue::get(Result); } + case Builtin::BI__builtin_selectvector: { +return RValue::get(Builder.CreateSelect(EmitScalarExpr(E->getArg(2)),

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Phoebe Wang via cfe-commits
@@ -3019,6 +3019,26 @@ C-style cast applied to each element of the first argument. Query for this feature with ``__has_builtin(__builtin_convertvector)``. +``__builtin_selectvector`` +-- + +``__builtin_selectvector`` is used to express generic vector

[clang] 239f8b9 - [AST] RecursiveASTVisitor: Don't traverse the alias deduction guides in the default mode. (#91454)

2024-05-16 Thread via cfe-commits
Author: Haojian Wu Date: 2024-05-16T12:44:47+02:00 New Revision: 239f8b9eb0725b4c6ff8342717b6abbfc9a7915a URL: https://github.com/llvm/llvm-project/commit/239f8b9eb0725b4c6ff8342717b6abbfc9a7915a DIFF: https://github.com/llvm/llvm-project/commit/239f8b9eb0725b4c6ff8342717b6abbfc9a7915a.diff LO

[clang] [AST] RecursiveASTVisitor: Don't traverse the alias deduction guides in the default mode. (PR #91454)

2024-05-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/91454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C Endilll wrote: Non-standard spellings of this attribute are out of scope of the Core issue

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Phoebe Wang via cfe-commits
@@ -41,6 +41,22 @@ typedef long long __m512i_u __attribute__((__vector_size__(64), __aligned__(1))) typedef unsigned char __mmask8; typedef unsigned short __mmask16; +#ifdef __cplusplus +typedef bool __vecmask2 __attribute__((__ext_vector_type__(2))); +typedef bool __vecmask4

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Phoebe Wang via cfe-commits
@@ -77,9 +77,9 @@ _mm512_cvtne2ps_pbh(__m512 __A, __m512 __B) { ///conversion of __B, and higher 256 bits come from conversion of __A. static __inline__ __m512bh __DEFAULT_FN_ATTRS512 _mm512_mask_cvtne2ps_pbh(__m512bh __W, __mmask32 __U, __m512 __A, __m512 __B) { - return

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Phoebe Wang via cfe-commits
@@ -41,6 +41,22 @@ typedef long long __m512i_u __attribute__((__vector_size__(64), __aligned__(1))) typedef unsigned char __mmask8; typedef unsigned short __mmask16; +#ifdef __cplusplus +typedef bool __vecmask2 __attribute__((__ext_vector_type__(2))); +typedef bool __vecmask4

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/4] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] a960573 - [clang] CTAD: implement the missing IsDeducible constraint for alias templates (#89358)

2024-05-16 Thread via cfe-commits
Author: Haojian Wu Date: 2024-05-16T13:01:18+02:00 New Revision: a9605730a481707623358d3b12220f05cfdc50a8 URL: https://github.com/llvm/llvm-project/commit/a9605730a481707623358d3b12220f05cfdc50a8 DIFF: https://github.com/llvm/llvm-project/commit/a9605730a481707623358d3b12220f05cfdc50a8.diff LO

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-05-16 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/89358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-05-16 Thread Alex Voicu via cfe-commits
@@ -23,8 +26,8 @@ struct B : A { void g(A *a) { a->foo(); } // CHECK1-LABEL: define{{.*}} void @_ZN5test14fooAEv() -// CHECK1: call void @_ZN5test11AC1Ev(ptr -// CHECK1: %[[VTABLE:.*]] = load ptr addrspace(1), ptr %{{.*}} +// CHECK1: call{{.*}} void @_ZN5test11AC1Ev(ptr {{((ad

[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)

2024-05-16 Thread Ilya Biryukov via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s + +// Scalar types are bitwise clonable. +static_assert(__is_bitwise_cloneable(int)); +static_assert(__is_bitwise_cloneable(int*)); +// array +static_assert(__is_bitwise_cloneable(int[10])); + +// non-scalar

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-16 Thread Vikram Hegde via cfe-commits
@@ -243,11 +243,16 @@ def VOP_READFIRSTLANE : VOPProfile <[i32, i32, untyped, untyped]> { // FIXME: Specify SchedRW for READFIRSTLANE_B32 // TODO: There is VOP3 encoding also def V_READFIRSTLANE_B32 : VOP1_Pseudo <"v_readfirstlane_b32", VOP_READFIRSTLANE, -

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-16 Thread Matt Arsenault via cfe-commits
@@ -243,11 +243,16 @@ def VOP_READFIRSTLANE : VOPProfile <[i32, i32, untyped, untyped]> { // FIXME: Specify SchedRW for READFIRSTLANE_B32 // TODO: There is VOP3 encoding also def V_READFIRSTLANE_B32 : VOP1_Pseudo <"v_readfirstlane_b32", VOP_READFIRSTLANE, -

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-16 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. LGTM now, modulo the license conc

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-16 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/91445 __

[clang] [clang][analyzer] Add checker 'security.SetgidSetuidOrder' (PR #91445)

2024-05-16 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -0,0 +1,75 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,secur

[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)

2024-05-16 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I second @cor3ntin's concern here. We are adding a builtin that is named very similarly to the one from C++23 standard, but not actually having the semantics that is desired. I believe we do need the effect that __builtin_launder provides to allow memcpy for types that ha

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-16 Thread Vikram Hegde via cfe-commits
@@ -243,11 +243,16 @@ def VOP_READFIRSTLANE : VOPProfile <[i32, i32, untyped, untyped]> { // FIXME: Specify SchedRW for READFIRSTLANE_B32 // TODO: There is VOP3 encoding also def V_READFIRSTLANE_B32 : VOP1_Pseudo <"v_readfirstlane_b32", VOP_READFIRSTLANE, -

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-16 Thread Egor Pasko via cfe-commits
@@ -101,6 +101,7 @@ void initializeEarlyMachineLICMPass(PassRegistry&); void initializeEarlyTailDuplicatePass(PassRegistry&); void initializeEdgeBundlesPass(PassRegistry&); void initializeEHContGuardCatchretPass(PassRegistry &); +void initializeEntryExitInstrumenterPass(PassReg

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-16 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH edited https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][WIP] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-05-16 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH edited https://github.com/llvm/llvm-project/pull/89217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)

2024-05-16 Thread Aaron Ballman via cfe-commits
@@ -14574,9 +14574,17 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) { default: return false; + case Builtin::BI__builtin_frexpl: +// AIX library function `frexpl` has 'long double' type and not +// PPCDoubleDouble type. To make sure we generate t

[clang] [Clang][Sema] Don't build CXXDependentScopeMemberExprs for potentially implicit class member access expressions (PR #92318)

2024-05-16 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/92318 >From 6c8646dbb04cc5898fe7f67c9923036b2f68b56d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 15 May 2024 16:13:03 -0400 Subject: [PATCH 1/3] [Clang][Sema] Don't build CXXDependentScopeMemberExp

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-05-16 Thread John Brawn via cfe-commits
@@ -6178,10 +6178,16 @@ The current supported opcode vocabulary is limited: the last entry from the second last entry and appends the result to the expression stack. - ``DW_OP_plus_uconst, 93`` adds ``93`` to the working expression. -- ``DW_OP_LLVM_fragment, 16, 8`` specifi

[clang] [clang] Use constant rounding mode for floating literals (PR #90877)

2024-05-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. The changes should come with a release note so that users know about the behavioral change, but otherwise LGTM. https://github.com/llvm/llvm-project/pull/90877 ___ cfe-commits mailing list cf

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-16 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/92385 We previously doubled the id-expression expansion, even when the pack was expanded to empty. The previous condition for determining whether we should expand couldn't distinguish between cases where 'the expansio

[clang] [Clang][Sema] Avoid pack expansion for expanded empty PackIndexingExprs (PR #92385)

2024-05-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes We previously doubled the id-expression expansion, even when the pack was expanded to empty. The previous condition for determining whether we should expand couldn't distinguish between cases where 'the expa

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/91356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
@@ -9,6 +9,12 @@ #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR __arm_streaming_compatible paulwalker-arm wrote: Do you need to use `__arm_streaming_compatible` here? Now we've agreed this keyword has

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
@@ -8982,11 +8982,18 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { const FunctionDecl *FD = cast(CurContext); llvm::StringMap CallerFeatureMap; Context.getFunctionFeatureMap(CallerFeatureMap, FD); -if (!Builtin::evaluateRequiredTargetFeatures( -

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm commented: After further discussion I know understand the `__arm_streaming_compatible` keyword has no affect on the target features in play and only tells the compiler not to emit any SM state changing instructions as part of the calling convention. https://g

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/91356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92295 >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 15 May 2024 20:20:43 +0300 Subject: [PATCH 1/5] [clang] Implement CWG2428 "Deprecating a concept" ---

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread Vlad Serebrennikov via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C Endilll wrote: I added support for GNU and MSVC spellings. https://github.com/llvm/llvm-p

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread via cfe-commits
@@ -316,7 +318,8 @@ Parser::ParseConceptDefinition(const ParsedTemplateInfo &TemplateInfo, const IdentifierInfo *Id = Result.Identifier; SourceLocation IdLoc = Result.getBeginLoc(); - DiagnoseAndSkipCXX11Attributes(); + ParsedAttributes Attrs(AttrFactory); + MaybeParse

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread via cfe-commits
@@ -8092,6 +8092,18 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc); } +void Sema::CheckConstrainedAuto(TypeSourceInfo *TS) { + if (getLangOpts().CPlusPlus20) { +if (const AutoType

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-16 Thread via cfe-commits
@@ -8092,6 +8092,18 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, diagnoseArgDependentDiagnoseIfAttrs(FD, ThisArg, Args, Loc); } +void Sema::CheckConstrainedAuto(TypeSourceInfo *TS) { + if (getLangOpts().CPlusPlus20) { cor3nti

[clang] [clang-tools-extra] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-16 Thread via cfe-commits
klensy wrote: Moved flang fixed to https://github.com/llvm/llvm-project/pull/92387 https://github.com/llvm/llvm-project/pull/91854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >