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

2024-02-08 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/81042 >From 9271e67ab27f850413e3d6d6f1383454067efe75 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Wed, 7 Feb 2024 13:29:45 -0800 Subject: [PATCH] Diagnosis for constexpr constructor not initializing a union

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

2024-02-08 Thread Matt Arsenault 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 arsenm wrote: Changing the clang

[clang] dd9511d - [clang][Interp][NFC] Convert test case to verify=expected,both style

2024-02-08 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-08T10:31:07+01:00 New Revision: dd9511d3e46094ec15282bce6eba163fed2226a4 URL: https://github.com/llvm/llvm-project/commit/dd9511d3e46094ec15282bce6eba163fed2226a4 DIFF: https://github.com/llvm/llvm-project/commit/dd9511d3e46094ec15282bce6eba163fed2226a4.diff

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-08 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: > So the intent of the current ordering was to allow creating a toolchain by > placing the libc++ headers alongside Clang, as is typically done (and > exceptionally not done on Apple platforms). On Apple platforms, you basically > always specify a sysroot, either explicitly

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-08 Thread Vinayak Dev via cfe-commits
https://github.com/vinayakdsci updated https://github.com/llvm/llvm-project/pull/81127 >From be1f3528d9fa90bf0fe930744f9df054d0b45425 Mon Sep 17 00:00:00 2001 From: Vinayak Dev Date: Thu, 8 Feb 2024 17:29:44 +0530 Subject: [PATCH] [Clang][Sema]: Allow copy constructor side effects ---

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

2024-02-08 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: Patch run through `clang-tidy --checks=readability-identifier-naming` with the config file in tree and recommendations applied. Some of the choices seem poor but it's presumably acceptable. https://github.com/llvm/llvm-project/pull/81058

[clang] [clang] Use CPlusPlus language option instead of Bool (PR #80975)

2024-02-08 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > The side-effect on OpenCL looks good to me; thanks! Thanks! https://github.com/llvm/llvm-project/pull/80975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8697bbe - [clang] Use CPlusPlus language option instead of Bool (#80975)

2024-02-08 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2024-02-08T14:31:57+01:00 New Revision: 8697bbe2d4aed109520e83c6beab52196ec5b702 URL: https://github.com/llvm/llvm-project/commit/8697bbe2d4aed109520e83c6beab52196ec5b702 DIFF:

[clang] [clang] Use CPlusPlus language option instead of Bool (PR #80975)

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

[clang] [Clang][Sema] Abbreviated function templates do not append invented parameters to empty template parameter lists (PR #80864)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80864 >From 908b3a129ec02a7ecae0ed3b8386e4e505274315 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 6 Feb 2024 11:08:04 -0500 Subject: [PATCH] [Clang][Sema] Abbreviated function templates do not

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-02-08 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int

[clang] [llvm] InstCombine: Enable SimplifyDemandedUseFPClass and remove flag (PR #81108)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Matt Arsenault (arsenm) Changes This completes the unrevert of ef388334ee5a3584255b9ef5b3fefdb244fa3fd7. --- Full diff: https://github.com/llvm/llvm-project/pull/81108.diff 3 Files Affected: - (modified)

[clang] [llvm] InstCombine: Enable SimplifyDemandedUseFPClass and remove flag (PR #81108)

2024-02-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/81108 This completes the unrevert of ef388334ee5a3584255b9ef5b3fefdb244fa3fd7. >From 7b5b50597e13c647ec70beab35dcc9b643bff42f Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Thu, 8 Feb 2024 14:15:33 +0530 Subject:

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

2024-02-08 Thread Matt Arsenault via cfe-commits
arsenm wrote: Next piece in #81108 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] [llvm] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-08 Thread Matt Arsenault via cfe-commits
@@ -1562,8 +1562,9 @@ bool IRTranslator::translateBitCast(const User , bool IRTranslator::translateCast(unsigned Opcode, const User , MachineIRBuilder ) { - if (U.getType()->getScalarType()->isBFloatTy() || -

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

2024-02-08 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][analyzer] Remove 'alpha.core.CallAndMessageUnInitRefArg' from documentation (NFC). (PR #81138)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes This checker does not exist (any more?) but appeared in the documentation. No other references to CallAndMessageUnInitRefArg are found in the full clang code. --- Full diff:

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

2024-02-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/81083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/81083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-08 Thread Matt Arsenault via cfe-commits
@@ -5908,7 +5908,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, } } -assert(PTy->canLosslesslyBitCastTo(FTy->getParamType(i)) && +assert(ArgValue->getType()->canLosslesslyBitCastTo(PTy) &&

[clang] d63c8be - [clang][ExprConst] Remove unnecessary cast

2024-02-08 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-08T15:30:24+01:00 New Revision: d63c8bee58b5d4dad9f1c550a342e782e0038f28 URL: https://github.com/llvm/llvm-project/commit/d63c8bee58b5d4dad9f1c550a342e782e0038f28 DIFF: https://github.com/llvm/llvm-project/commit/d63c8bee58b5d4dad9f1c550a342e782e0038f28.diff

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-02-08 Thread Erich Keane via cfe-commits
erichkeane wrote: > Should I fix the conflict in the release notes myself, or should that be done > when this gets merged? Because at least in my experience, merge conflicts in > the release notes just keep reappearing if a pr stays open for some time... Lets hang out on that for a bit...

[clang] cd18342 - [clang][Interp] Fix handling of generic lambdas

2024-02-08 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-08T16:03:42+01:00 New Revision: cd183428a9af6d7dda2018a88aeb495f268716b5 URL: https://github.com/llvm/llvm-project/commit/cd183428a9af6d7dda2018a88aeb495f268716b5 DIFF: https://github.com/llvm/llvm-project/commit/cd183428a9af6d7dda2018a88aeb495f268716b5.diff

[clang] [Clang][Sema] Diagnose friend declarations with enum elaborated-type-specifier in all language modes (PR #80171)

2024-02-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80171 >From 6f8851bf21ff0a6bc9b4f2ff39df6bf00f30ee34 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Wed, 31 Jan 2024 11:09:11 -0500 Subject: [PATCH] [Clang][Sema] Diagnose friend declarations with enum

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-02-08 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/81102 >From d489acbd3cfb656d203e1f05b74c238351c5428a Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 8 Feb 2024 08:33:03 +0100 Subject: [PATCH 1/2] [Clang] Properly get captured 'this' pointer in lambdas with an

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 376d5b0f6986f7cdf7bddd29fdbd418ba632da7a Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-08 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/4] [Clang][AArch64] Warn when calling

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

2024-02-08 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

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

2024-02-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh commented: My comments are mostly about style, I haven't done a deep dive into the logic of the pass yet https://github.com/llvm/llvm-project/pull/81058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-02-08 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh 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] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-02-08 Thread Abhin P Jose via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-02-08 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int

[clang] [dataflow] Fix crash when InitListExpr is not a prvalue (PR #80970)

2024-02-08 Thread Paul Semel via cfe-commits
https://github.com/paulsemel updated https://github.com/llvm/llvm-project/pull/80970 >From 1ff7ea57e76041b25889685ead115a1b793d3921 Mon Sep 17 00:00:00 2001 From: Paul Semel Date: Wed, 7 Feb 2024 10:26:23 + Subject: [PATCH] [dataflow] Fix crash when InitListExpr is not a prvalue ---

[clang] [dataflow] Fix crash when InitListExpr is not a prvalue (PR #80970)

2024-02-08 Thread Paul Semel via cfe-commits
@@ -648,6 +648,12 @@ class TransferVisitor : public ConstStmtVisitor { QualType Type = S->getType(); if (!Type->isStructureOrClassType()) { + // It is possible that InitListExpr is not a prvalue, in which case + // `setValue` will fail. In this case, we can

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

2024-02-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed 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][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81042)

2024-02-08 Thread Mariya Podchishchaeva 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}} Fznamznon wrote: We've got the desired error, I think

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

2024-02-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -150,6 +150,8 @@ Improvements to Clang's diagnostics - Clang now diagnoses member template declarations with multiple declarators. - Clang now diagnoses use of the ``template`` keyword after declarative nested name specifiers. +- Clang now diagnoses constexpr constructor

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

2024-02-08 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][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-08 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 a643ab852a63a14dba86e031247734c5e3d5adb9 3d06ced172a76490c13f892d9165d8cf2702eb87 --

[clang] [C23] Implement N3018: The constexpr specifier for object definitions (PR #73099)

2024-02-08 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping. https://github.com/llvm/llvm-project/pull/73099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Fix crash when InitListExpr is not a prvalue (PR #80970)

2024-02-08 Thread via cfe-commits
@@ -2313,6 +2313,20 @@ TEST(TransferTest, AssignmentOperatorWithInitAndInheritance) { ASTContext ) {}); } +TEST(TransferTest, InitListExprAsXValue) { + // This is a crash repro. + std::string Code = R"( +void target() { + auto&& test{false};

[clang] [dataflow] Fix crash when InitListExpr is not a prvalue (PR #80970)

2024-02-08 Thread via cfe-commits
https://github.com/martinboehme requested changes to this pull request. https://github.com/llvm/llvm-project/pull/80970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] Fix crash when InitListExpr is not a prvalue (PR #80970)

2024-02-08 Thread via cfe-commits
@@ -648,6 +648,12 @@ class TransferVisitor : public ConstStmtVisitor { QualType Type = S->getType(); if (!Type->isStructureOrClassType()) { + // It is possible that InitListExpr is not a prvalue, in which case + // `setValue` will fail. In this case, we can

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

2024-02-08 Thread Jon Chesterfield 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 JonChesterfield

[clang] [dataflow] Fix crash when InitListExpr is not a prvalue (PR #80970)

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

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-08 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping! https://github.com/llvm/llvm-project/pull/74512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use CPlusPlus language option instead of Bool (PR #80975)

2024-02-08 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh approved this pull request. The side-effect on OpenCL looks good to me; thanks! https://github.com/llvm/llvm-project/pull/80975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-02-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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] 06774d6 - [clang][Interp] Handle CXXInheritedCtorInitExprs

2024-02-08 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-08T15:36:07+01:00 New Revision: 06774d6bbf32aff45b67d8c3753524ec36bf8869 URL: https://github.com/llvm/llvm-project/commit/06774d6bbf32aff45b67d8c3753524ec36bf8869 DIFF: https://github.com/llvm/llvm-project/commit/06774d6bbf32aff45b67d8c3753524ec36bf8869.diff

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-02-08 Thread Abhin P Jose via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-02-08 Thread via cfe-commits
@@ -8480,6 +8480,54 @@ class LValueExprEvaluator }; } // end anonymous namespace +/// Get an lvalue to a field of a lambda's closure type. +static bool GetLambdaCaptureAsLValue(EvalInfo , const Expr *E, + LValue , const CXXMethodDecl *MD, +

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

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

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

2024-02-08 Thread Shilei Tian via cfe-commits
@@ -5908,7 +5908,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, } } -assert(PTy->canLosslesslyBitCastTo(FTy->getParamType(i)) && +assert(ArgValue->getType()->canLosslesslyBitCastTo(PTy) &&

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

2024-02-08 Thread via cfe-commits
Author: Shilei Tian Date: 2024-02-08T09:44:42-05:00 New Revision: c4b0dfcc99da7506bff6b57d563e5cbce9caf4cd URL: https://github.com/llvm/llvm-project/commit/c4b0dfcc99da7506bff6b57d563e5cbce9caf4cd DIFF: https://github.com/llvm/llvm-project/commit/c4b0dfcc99da7506bff6b57d563e5cbce9caf4cd.diff

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

2024-02-08 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/81083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fb6ef42 - [clang][Interp][NFC] Convert records test to verify=expected,both style

2024-02-08 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-08T15:52:56+01:00 New Revision: fb6ef4233968ffefb616d1c779a5483ef1f140d3 URL: https://github.com/llvm/llvm-project/commit/fb6ef4233968ffefb616d1c779a5483ef1f140d3 DIFF: https://github.com/llvm/llvm-project/commit/fb6ef4233968ffefb616d1c779a5483ef1f140d3.diff

[clang] [Clang][Sema] Properly get captured 'this' pointer in lambdas with an explicit object parameter in constant evaluator (PR #81102)

2024-02-08 Thread via cfe-commits
Sirraide wrote: Should I fix the conflict in the release notes myself, or should that be done when this gets merged? Because at least in my experience, merge conflicts in the release notes just keep reappearing if a pr stays open for some time...

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

2024-02-08 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/81042 >From 9271e67ab27f850413e3d6d6f1383454067efe75 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Wed, 7 Feb 2024 13:29:45 -0800 Subject: [PATCH 1/2] Diagnosis for constexpr constructor not initializing a union

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

2024-02-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: I think this needs codegen tests for the gfx900 vs. gfx906 mad_mix/fma_fix issue https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-02-08 Thread Mariya Podchishchaeva 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] [Clang][Sema] Diagnosis for constexpr constructor not initializing a union member (PR #81042)

2024-02-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -2393,6 +2393,25 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, Kind)) return false; } +} else if (!Constructor->isDelegatingConstructor()) { + for (const Decl *decl :

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

2024-02-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -2393,6 +2393,25 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, Kind)) return false; } +} else if (!Constructor->isDelegatingConstructor()) { + for (const Decl *decl :

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vinayak Dev (vinayakdsci) Changes Fixes #79518 Copy constructors can have initialization with side effects, and thus clang should not emit a warning when -Wunused-variable is used in this context. Currently however, a warning is

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-08 Thread Vinayak Dev via cfe-commits
https://github.com/vinayakdsci created https://github.com/llvm/llvm-project/pull/81127 Fixes #79518 Copy constructors can have initialization with side effects, and thus clang should not emit a warning when -Wunused-variable is used in this context. Currently however, a warning is emitted.

[clang] 4b72c5e - [clang][Sema] Subclass `-Wshorten-64-to-32` under `-Wimplicit-int-conversion` (#80814)

2024-02-08 Thread via cfe-commits
Author: whisperity Date: 2024-02-08T13:37:55+01:00 New Revision: 4b72c5e8277f8688f7ce0bc953f9f3ea54420358 URL: https://github.com/llvm/llvm-project/commit/4b72c5e8277f8688f7ce0bc953f9f3ea54420358 DIFF: https://github.com/llvm/llvm-project/commit/4b72c5e8277f8688f7ce0bc953f9f3ea54420358.diff

[clang] [clang][Sema] Subclass `-Wshorten-64-to-32` under `-Wimplicit-int-conversion` (PR #80814)

2024-02-08 Thread via cfe-commits
https://github.com/whisperity closed https://github.com/llvm/llvm-project/pull/80814 ___ 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-08 Thread Jon Chesterfield 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-08 Thread Jon Chesterfield 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve via cfe-commits
@@ -0,0 +1,701 @@ +//===-- 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-08 Thread Pierre van Houtryve 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] b85fe40 - [clang][analyzer] Add missing stream related functions to StdLibraryFunctionsChecker. (#76979)

2024-02-08 Thread via cfe-commits
Author: Balázs Kéri Date: 2024-02-08T11:09:57+01:00 New Revision: b85fe40cb88a6b4f640c2b757bd0d254ff1d032c URL: https://github.com/llvm/llvm-project/commit/b85fe40cb88a6b4f640c2b757bd0d254ff1d032c DIFF: https://github.com/llvm/llvm-project/commit/b85fe40cb88a6b4f640c2b757bd0d254ff1d032c.diff

[clang] [clang][analyzer] Add missing stream related functions to StdLibraryFunctionsChecker. (PR #76979)

2024-02-08 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/76979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 1706840eccdabcd3d5cc8bd7a80c9db96d6230c3 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

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

2024-02-08 Thread via cfe-commits
@@ -2393,6 +2393,25 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, Kind)) return false; } +} else if (!Constructor->isDelegatingConstructor()) { + for (const Decl *decl :

[clang] [dataflow] CXXOperatorCallExpr equal operator might not be a glvalue (PR #80991)

2024-02-08 Thread via cfe-commits
https://github.com/martinboehme requested changes to this pull request. https://github.com/llvm/llvm-project/pull/80991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow] CXXOperatorCallExpr equal operator might not be a glvalue (PR #80991)

2024-02-08 Thread via cfe-commits
@@ -535,7 +535,19 @@ class TransferVisitor : public ConstStmtVisitor { return; copyRecord(*LocSrc, *LocDst, Env); - Env.setStorageLocation(*S, *LocDst); + + // If the expr is a glvalue, we can reasonably assume the operator is + // returning T&

[clang] [dataflow] CXXOperatorCallExpr equal operator might not be a glvalue (PR #80991)

2024-02-08 Thread via cfe-commits
@@ -535,7 +535,19 @@ class TransferVisitor : public ConstStmtVisitor { return; copyRecord(*LocSrc, *LocDst, Env); - Env.setStorageLocation(*S, *LocDst); + + // If the expr is a glvalue, we can reasonably assume the operator is + // returning T&

[clang] [dataflow] CXXOperatorCallExpr equal operator might not be a glvalue (PR #80991)

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

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-02-08 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int

[clang] [clang][analyzer] Change default value of checker option in unix.StdCLibraryFunctions. (PR #80457)

2024-02-08 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/80457 From 1f65abda712efce624c01ec99675c8261a8e6cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Wed, 31 Jan 2024 17:40:21 +0100 Subject: [PATCH] {clang][analyzer] Change default value of

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

2024-02-08 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1100 -show-encoding %s | FileCheck %s +// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1200 -show-encoding %s | FileCheck %s + +v_dot2_bf16_bf16 v5, v1, v2, 100.0 arsenm wrote: does this help with #79369 at all?

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

2024-02-08 Thread Matt Arsenault via cfe-commits
@@ -1562,8 +1562,9 @@ bool IRTranslator::translateBitCast(const User , bool IRTranslator::translateCast(unsigned Opcode, const User , MachineIRBuilder ) { - if (U.getType()->getScalarType()->isBFloatTy() || -

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

2024-02-08 Thread Matt Arsenault via cfe-commits
@@ -2835,8 +2835,8 @@ def int_amdgcn_fdot2_f32_bf16 : DefaultAttrsIntrinsic< [llvm_float_ty], // %r [ - llvm_v2i16_ty, // %a - llvm_v2i16_ty, // %b + llvm_v2bf16_ty, // %a + llvm_v2bf16_ty, // %b arsenm wrote: For potential

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-08 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,199 @@ +; Testing the -amdgpu-precise-memory-op option +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -mattr=+amdgpu-precise-memory-op -verify-machineinstrs < %s | FileCheck %s -check-prefixes=GFX9 +; RUN: llc -mtriple=amdgcn -mcpu=gfx90a -mattr=+amdgpu-precise-memory-op

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-08 Thread Matt Arsenault via cfe-commits
@@ -167,6 +167,10 @@ def FeatureCuMode : SubtargetFeature<"cumode", "Enable CU wavefront execution mode" >; +def FeaturePreciseMemory arsenm wrote: The subtarget feature prefix should be removed. The subtarget feature name is not the user facing component

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 2b55af4e11a637e268e498242041cb0fe482e375 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

  1   2   3   4   5   >