[clang] [clang][analyzer] Add note tags to alpha.unix.BlockInCriticalSection (PR #80029)

2024-02-07 Thread Balázs Kéri via cfe-commits
@@ -57,6 +61,12 @@ class BlockInCriticalSectionChecker : public Checker { const CallEvent , CheckerContext ) const; + CritSectionMarker getCriticalSectionMarker(const CallEvent , +

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-07 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,44 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-07 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,44 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,273 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py + +// REQUIRES: x86-registered-target +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-cpu x86-64-v4 -std=c23 -O1 -ffreestanding -emit-llvm -o - %s | FileCheck %s + +//

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 -triple i386-unknown-linux-gnu -Wno-varargs -O1 -disable-llvm-passes -emit-llvm -o - %s | opt --passes=instcombine | opt -passes="expand-variadics,default" -S | FileCheck %s --check-prefixes=CHECK,X86Linux arsenm wrote:

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-07 Thread Dinar Temirbulatov via cfe-commits
@@ -1,5 +1,6 @@ -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -fsyntax-only -verify %s -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -fsyntax-only -verify=expected-cpp -x c++ %s +// RUN: %clang_cc1 -triple

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-07 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/3] [Clang][AArch64] Warn when calling

[clang] [clang][dataflow] Add support for `CXXRewrittenBinaryOperator`. (PR #81086)

2024-02-07 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/81086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a446c9b - [clang][dataflow] Add support for `CXXRewrittenBinaryOperator`. (#81086)

2024-02-07 Thread via cfe-commits
Author: martinboehme Date: 2024-02-08T08:38:35+01:00 New Revision: a446c9bf69b4797da329977366ca62e55a429a90 URL: https://github.com/llvm/llvm-project/commit/a446c9bf69b4797da329977366ca62e55a429a90 DIFF: https://github.com/llvm/llvm-project/commit/a446c9bf69b4797da329977366ca62e55a429a90.diff

[clang] [clang] require template arg list after template kw (PR #80801)

2024-02-07 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/80801 >From fd07c0a15eb45c3e7eb400026ea7702ae909a11e Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Mon, 5 Feb 2024 21:26:07 -0800 Subject: [PATCH 1/3] [clang] require template arg list after template kw Require a

[clang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-02-07 Thread Pierre van Houtryve via cfe-commits
Pierre-vh wrote: @t-tye Can you please approve then? Otherwise the diff still shows a red "Changes requested" warning :) Thanks @arsenm Please also approve if there are no more comments https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits

[clang] [clang-format] Fix a regression in dumping the config (PR #80628)

2024-02-07 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#81096 https://github.com/llvm/llvm-project/pull/80628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in dumping the config (PR #80628)

2024-02-07 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 8f6e13e6da84 https://github.com/llvm/llvm-project/pull/80628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in dumping the config (PR #80628)

2024-02-07 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/80628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] GH70601 (PR #81095)

2024-02-07 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/81095 Testing libc++'s CI. >From 906fbf5b0796a85bf54028dfaa8e6343ea441a51 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 8 Feb 2024 15:07:47 +0800 Subject: [PATCH] GH70601 ---

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/74056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

2024-02-07 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/81093 >From b9463c6664227edd6e579840292389909be04ab2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 7 Feb 2024 22:43:15 -0800 Subject: [PATCH 1/2] [clang-format] Rename option AlwaysBreakTemplateDeclarations Drop

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,589 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: -p --function-signature +; RUN: opt -S --passes=expand-variadics < %s | FileCheck %s +target datalayout =

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,589 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: -p --function-signature +; RUN: opt -S --passes=expand-variadics < %s | FileCheck %s +target datalayout =

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,589 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: -p --function-signature +; RUN: opt -S --passes=expand-variadics < %s | FileCheck %s +target datalayout =

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

2024-02-07 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 8f6e13e6da84510c8321717860fd506e12118514...b9463c6664227edd6e579840292389909be04ab2

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Drop the "Always" prefix to remove the self-contradiction. --- Full diff: https://github.com/llvm/llvm-project/pull/81093.diff 5 Files Affected: - (modified) clang/docs/ClangFormatStyleOptions.rst

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Owen Pan (owenca) Changes Drop the "Always" prefix to remove the self-contradiction. --- Full diff: https://github.com/llvm/llvm-project/pull/81093.diff 5 Files Affected: - (modified) clang/docs/ClangFormatStyleOptions.rst (+61-56) -

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

2024-02-07 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/81093 Drop the "Always" prefix to remove the self-contradiction. >From b9463c6664227edd6e579840292389909be04ab2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 7 Feb 2024 22:43:15 -0800 Subject: [PATCH]

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty,

[clang] [compiler-rt] [llvm] [X86] Support APXF to enable __builtin_cpu_supports. (PR #80636)

2024-02-07 Thread Freddy Ye via cfe-commits
@@ -1845,6 +1845,7 @@ bool sys::getHostCPUFeatures(StringMap ) { Features["prefetchi"] = HasLeaf7Subleaf1 && ((EDX >> 14) & 1); Features["usermsr"] = HasLeaf7Subleaf1 && ((EDX >> 15) & 1); Features["avx10.1-256"] = HasLeaf7Subleaf1 && ((EDX >> 19) & 1); +

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty,

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty,

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty,

[clang] [Driver] Remove "-android" from compiler-rt library names for legacy LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=off (PR #81044)

2024-02-07 Thread via cfe-commits
pirama-arumuga-nainar wrote: (The linux libraries use the new layout but still have symlinks from the old names since even that migration is still pending better integration with the Android build system). https://github.com/llvm/llvm-project/pull/81044

[clang] [Driver] Remove "-android" from compiler-rt library names for legacy LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=off (PR #81044)

2024-02-07 Thread via cfe-commits
pirama-arumuga-nainar wrote: The AOSP clang toolchain uses the new layout+names for targeting linux but hasn't migrated for compiler-rt libs targeting Android. See https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/refs/heads/main/clang-r510928/lib/clang/18/lib/linux/

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81042)

2024-02-07 Thread via cfe-commits
@@ -224,6 +224,9 @@ struct TemplateInit { }; // FIXME: This is ill-formed (no diagnostic required). We should diagnose it. constexpr TemplateInit() {} // desired-error {{must initialize all members}} +#ifndef CXX2A mahtohappy wrote: yes, I'm here just

[clang] Consider aggregate bases when checking if an InitListExpr is constant (PR #80519)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
shafik wrote: @AaronBallman since this involves compound literals a C-ism, I would like you to review this as well. https://github.com/llvm/llvm-project/pull/80519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
@@ -1385,6 +1385,11 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer( Diag(RAngleLoc, diag::err_lambda_template_parameter_list_empty); } else { + // We increase the template depth before recursing into a requires-clause. + // The

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
@@ -168,3 +168,30 @@ auto lambda4 = [] requires(sizeof(char) == 1){}; // expected-error {{expected bo #if __cplusplus <= 202002L // expected-warning@-2{{lambda without a parameter clause is a C++23 extension}} #endif + +namespace GH78524 { + +template T Foo; + +template

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/80656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Have the depth of the abbreviated generic lambdas inside a requires clause differ from the surrounding generic lambda (PR #80656)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I think this makes sense but I would like @cor3ntin to approve. https://github.com/llvm/llvm-project/pull/80656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Fix a regression in dumping the config (PR #80628)

2024-02-07 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/80628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8f6e13e - [clang-format] Fix a regression in dumping the config (#80628)

2024-02-07 Thread via cfe-commits
Author: Owen Pan Date: 2024-02-07T21:35:43-08:00 New Revision: 8f6e13e6da84510c8321717860fd506e12118514 URL: https://github.com/llvm/llvm-project/commit/8f6e13e6da84510c8321717860fd506e12118514 DIFF: https://github.com/llvm/llvm-project/commit/8f6e13e6da84510c8321717860fd506e12118514.diff

[clang] [clang][ExtractAPI] improve template argument name deduction (PR #77716)

2024-02-07 Thread Erick Velez via cfe-commits
evelez7 wrote: ping https://github.com/llvm/llvm-project/pull/77716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add support for `CXXRewrittenBinaryOperator`. (PR #81086)

2024-02-07 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/81086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81014 >From 5ba669011752b6ea6e6fe5f6141c4af66ca7ccbf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 7 Feb 2024 17:25:10 +0100 Subject: [PATCH 01/17] [Clang] Parsing and Sema for C++23's `assume` attribute ---

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81014 >From 5ba669011752b6ea6e6fe5f6141c4af66ca7ccbf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 7 Feb 2024 17:25:10 +0100 Subject: [PATCH 01/17] [Clang] Parsing and Sema for C++23's `assume` attribute ---

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Yingwei Zheng via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty,

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty,

[clang] [llvm] Reapply "InstCombine: Introduce SimplifyDemandedUseFPClass"" (PR #74056)

2024-02-07 Thread Matt Arsenault via cfe-commits
@@ -1877,3 +1877,139 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V, return MadeChange ? I : nullptr; } + +/// For floating-point classes that resolve to a single bit pattern, return that +/// value. +static Constant *getFPClassConstant(Type *Ty,

[clang] [clang] require template arg list after template kw (PR #80801)

2024-02-07 Thread Erick Velez via cfe-commits
evelez7 wrote: I was wondering why the Windows CI was failing but seems to be bugged according to Discourse. Newest commit changes the error to a pedantic warning that defaults to an error. https://github.com/llvm/llvm-project/pull/80801 ___

[clang] [clang][NFC] resolve redundant predicates (PR #79701)

2024-02-07 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/79701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 351f94d - [clang][NFC] resolve redundant predicates (#79701)

2024-02-07 Thread via cfe-commits
Author: Rageking8 Date: 2024-02-08T06:05:53+01:00 New Revision: 351f94d981f363909ae6e76ed57cd0a75c3f5688 URL: https://github.com/llvm/llvm-project/commit/351f94d981f363909ae6e76ed57cd0a75c3f5688 DIFF: https://github.com/llvm/llvm-project/commit/351f94d981f363909ae6e76ed57cd0a75c3f5688.diff

[clang] [llvm] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

2024-02-07 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,25 @@ +; RUN: llc -march=mips < %s | FileCheck %s --check-prefix=MIPS32 +; RUN: llc -march=mips64 < %s | FileCheck %s --check-prefix=MIPS64 + +define dso_local void @read_double(double* nocapture noundef readonly %0) local_unnamed_addr #0 { MaskRay

[clang] [llvm] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

2024-02-07 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -triple mips -target-feature +soft-float -DSOFT_FLOAT_NO_CONSTRAINT_F -fsyntax-only -verify %s + +#ifdef SOFT_FLOAT_NO_CONSTRAINT_F +void read_float(float* p) { MaskRay wrote: Can just use argument `float p`?

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81014 >From 5ba669011752b6ea6e6fe5f6141c4af66ca7ccbf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 7 Feb 2024 17:25:10 +0100 Subject: [PATCH 01/16] [Clang] Parsing and Sema for C++23's `assume` attribute ---

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81014 >From 5ba669011752b6ea6e6fe5f6141c4af66ca7ccbf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 7 Feb 2024 17:25:10 +0100 Subject: [PATCH 01/15] [Clang] Parsing and Sema for C++23's `assume` attribute ---

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-07 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa edited https://github.com/llvm/llvm-project/pull/80939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-07 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa edited https://github.com/llvm/llvm-project/pull/80939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
Sirraide wrote: Ok, I’ve added some more tests involving template instantiation (and also implemented actually handling `assume` in TreeTransform because I seem to have forgotten about that earlier...); just let me know if there are any other specific situations that we should test.

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81014 >From 5ba669011752b6ea6e6fe5f6141c4af66ca7ccbf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 7 Feb 2024 17:25:10 +0100 Subject: [PATCH 01/14] [Clang] Parsing and Sema for C++23's `assume` attribute ---

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-07 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa updated https://github.com/llvm/llvm-project/pull/80939 >From ac75fc2873fc7b8eec6c24ba97f4673e94457c8e Mon Sep 17 00:00:00 2001 From: Atousa Duprat Date: Tue, 6 Feb 2024 21:02:05 -0800 Subject: [PATCH] [clang] Use separator for large numeric values in overflow

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-adt Author: Atousa Duprat (Atousa) Changes Add functionality to APInt::toString() that allows it to insert separators between groups of digits, using the C++ litteral separator ' between groups. Fixes issue #58228

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-07 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa converted_to_draft https://github.com/llvm/llvm-project/pull/80939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-07 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa ready_for_review https://github.com/llvm/llvm-project/pull/80939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-02-07 Thread Tony Tye via cfe-commits
https://github.com/t-tye commented: Documentation LGTM. Thanks. https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add Leave to AlwaysBreakTemplateDeclarations (PR #80569)

2024-02-07 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/80569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d033799 - [clang-format] Add Leave to AlwaysBreakTemplateDeclarations (#80569)

2024-02-07 Thread via cfe-commits
Author: Owen Pan Date: 2024-02-07T20:24:44-08:00 New Revision: d033799050b7bda70d80a933d5d99b7088a72a95 URL: https://github.com/llvm/llvm-project/commit/d033799050b7bda70d80a933d5d99b7088a72a95 DIFF: https://github.com/llvm/llvm-project/commit/d033799050b7bda70d80a933d5d99b7088a72a95.diff

[clang] [clang][dataflow] Add support for `CXXRewrittenBinaryOperator`. (PR #81086)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes This occurs in rewritten candidates for binary operators (a C++20 feature). The patch modifies UncheckedOptionalAccessModelTest to run in C++20 mode (as well as C++17 mode,

[clang] [clang][dataflow] Add support for `CXXRewrittenBinaryOperator`. (PR #81086)

2024-02-07 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/81086 This occurs in rewritten candidates for binary operators (a C++20 feature). The patch modifies UncheckedOptionalAccessModelTest to run in C++20 mode (as well as C++17 mode, as before) and to use rewritten

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-07 Thread via cfe-commits
gulfemsavrun wrote: > What are the next steps to work to land this? We're interested to try this > out for Chrome! We just need to land this :) https://github.com/llvm/llvm-project/pull/75425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-07 Thread via cfe-commits
https://github.com/gulfemsavrun updated https://github.com/llvm/llvm-project/pull/75425 >From d98bf5ae49caee5d5539f5104011c6d1e217e6c6 Mon Sep 17 00:00:00 2001 From: Gulfem Savrun Yeniceri Date: Thu, 14 Dec 2023 03:40:57 + Subject: [PATCH] [InstrProf] Single byte counters in coverage This

[clang] [llvm] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-07 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From 6a2bacee940d95abc53bcff2332b0d9aa0f1073f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 7 Feb 2024 23:09:33 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81014 >From 5ba669011752b6ea6e6fe5f6141c4af66ca7ccbf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 7 Feb 2024 17:25:10 +0100 Subject: [PATCH 01/13] [Clang] Parsing and Sema for C++23's `assume` attribute ---

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-07 Thread via cfe-commits
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord , uint64_t Weight, for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) { bool Overflowed; -uint64_t Value = -SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], ); -if (Value >

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81042)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
@@ -224,6 +224,9 @@ struct TemplateInit { }; // FIXME: This is ill-formed (no diagnostic required). We should diagnose it. constexpr TemplateInit() {} // desired-error {{must initialize all members}} +#ifndef CXX2A shafik wrote: We normally do this

[clang] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81042)

2024-02-07 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++14 -verify -fcxx-exceptions -Werror=c++14-extensions -Werror=c++20-extensions %s + +template struct C { +union { + int i; +}; +constexpr C() {} // expected-error {{constexpr union constructor that does not

[clang] [llvm] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-07 Thread Shilei Tian via cfe-commits
@@ -2819,11 +2819,11 @@ def int_amdgcn_fdot2_f16_f16 : def int_amdgcn_fdot2_bf16_bf16 : ClangBuiltin<"__builtin_amdgcn_fdot2_bf16_bf16">, DefaultAttrsIntrinsic< -[llvm_i16_ty], // %r +[llvm_bfloat_ty], // %r shiltian wrote: Does it make sense

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-07 Thread via cfe-commits
@@ -234,8 +246,20 @@ struct MapRegionCounters : public RecursiveASTVisitor { if (Hash.getHashVersion() == PGO_HASH_V1) return Base::TraverseIfStmt(If); +// When single byte coverage mode is enabled, add a counter to then and +// else. +for (Stmt *CS :

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-07 Thread via cfe-commits
@@ -569,16 +577,26 @@ struct CounterCoverageMappingBuilder /// Return a counter for the subtraction of \c RHS from \c LHS Counter subtractCounters(Counter LHS, Counter RHS, bool Simplify = true) { +if (llvm::EnableSingleByteCoverage) + assert( + 0 && +

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-07 Thread via cfe-commits
https://github.com/gulfemsavrun updated https://github.com/llvm/llvm-project/pull/75425 >From 4dd98d84d45e960fe655b23c7b6ec7b4b5ea0114 Mon Sep 17 00:00:00 2001 From: Gulfem Savrun Yeniceri Date: Thu, 14 Dec 2023 03:40:57 + Subject: [PATCH] [InstrProf] Single byte counters in coverage This

[clang] [Clang] Fix a non-effective assertion (PR #81083)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shilei Tian (shiltian) Changes `PTy` here is literally `FTy-getParamType(i)`, which makes this assertion not work as expected. --- Full diff: https://github.com/llvm/llvm-project/pull/81083.diff 1 Files Affected: - (modified)

[clang] [Clang] Fix a non-effective assertion (PR #81083)

2024-02-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Shilei Tian (shiltian) Changes `PTy` here is literally `FTy-getParamType(i)`, which makes this assertion not work as expected. --- Full diff: https://github.com/llvm/llvm-project/pull/81083.diff 1 Files Affected: - (modified)

[clang] [Clang] Fix a non-effective assertion (PR #81083)

2024-02-07 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/81083 `PTy` here is literally `FTy->getParamType(i)`, which makes this assertion not work as expected. >From 076e6d3e1f5a88c4c54b0d2bf6932c9d9ae33678 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 7 Feb 2024

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-07 Thread via cfe-commits
Sirraide wrote: > I don't see any tests validating that these are being properly instantiated > (either by AST dump or by codegen), the only template cases i see are ones > where the instantiation not happening doesn't 'matter'. Also, I don't see how > these are affecting calls through

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield edited https://github.com/llvm/llvm-project/pull/81058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-07 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,698 @@ +//===-- ExpandVariadicsPass.cpp *- C++ -*-=// +// +// 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:

  1   2   3   4   5   >