[clang] [NFC] Add API documentation and annotations (PR #78635)

2024-02-13 Thread Chris B via cfe-commits
llvm-beanz wrote: @farzonl I like that idea, but I think there's a lot more work to do in order to get proper HLSL documentation coming out here. For these files should get processed as part of Clang's normal doxygen build, so they should get pulled in with the other clang API docs.

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-13 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseDesignatedInitializersCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-13 Thread Erich Keane via cfe-commits
@@ -285,30 +285,23 @@ template<> class SpecializationDecl; // CHECK: [[@LINE-1]]:7 | class(Gen,TS)/C++ | SpecializationDecl | c:@S@SpecializationDecl>#I | | Decl,RelSpecialization | rel: 1 // CHECK-NEXT: RelSpecialization | SpecializationDecl | c:@ST>1#T@SpecializationDecl

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-13 Thread Erich Keane via cfe-commits
@@ -279,7 +279,7 @@ namespace dr727 { // dr727: partial // cxx98-11-error@-1 {{variable templates are a C++14 extension}} // cxx98-14-error@-2 {{inline variables are a C++17 extension}} template<> static inline int v2; // #dr727-v2-T -// cxx98-14-error@-1

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-13 Thread Erich Keane via cfe-commits
@@ -222,7 +220,7 @@ int binTempl; template float binTempl = 1; -// CHECK: VarTemplatePartialSpecializationDecl 0x{{[^ ]*}} col:7 binTempl 'float' cinit erichkeane wrote: Why are we losing 'const-int' (Is that what cinit means?) here? Is that perhaps

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-13 Thread Erich Keane via cfe-commits
@@ -1985,44 +1986,45 @@ class ClassTemplateSpecializationDecl SpecializedTemplate = TemplDecl; } - /// Sets the type of this specialization as it was written by - /// the user. This will be a class template specialization type. - void setTypeAsWritten(TypeSourceInfo

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-13 Thread Erich Keane via cfe-commits
@@ -2596,23 +2582,24 @@ class VarTemplateSpecializationDecl : public VarDecl, llvm::PointerUnion SpecializedTemplate; - /// Further info for explicit template specialization/instantiation. - struct ExplicitSpecializationInfo { -/// The type-as-written. -

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-13 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/80541 From 528ec390e23e6883356606c9acdba3315d5f59bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 3 Feb 2024 13:13:50 +0100 Subject: [PATCH 01/28] Trigger on variable declarations ---

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-13 Thread via cfe-commits
PiJoules wrote: ping https://github.com/llvm/llvm-project/pull/81207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Add API documentation and annotations (PR #78635)

2024-02-13 Thread Farzon Lotfi via cfe-commits
farzonl wrote: It might be worth adding a .dox file something like this: ``` /*! \mainpage HLSL Overview \tableofcontents \section hlsl-introduction Introduction to HLSL - \ref hlsl_basic_types.h defines hlsl types -\ref -

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-13 Thread Erich Keane via cfe-commits
erichkeane wrote: >The "most breaking" change is to AST Matchers, insofar that hasTypeLoc will no >longer match class template specializations (since they no longer store the >type as written). I wasn't entirely sure what to replace the tests for this >behavior with, so I just commented them

[clang] [clang-format] Always add a space after #if and #elif (PR #81578)

2024-02-13 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/81578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement beginning parts of the 'parallel' Sema impl (PR #81659)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes This patch Implements AST node creation and appertainment enforcement for 'parallel', as well as changes the 'not implemented' messages to be more specific. It does not deal with clauses/clause legality,

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-13 Thread Eli Friedman via cfe-commits
@@ -592,10 +590,14 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType, // observed to be unnecessary. if (endOfInit.isValid()) Builder.CreateStore(element, endOfInit); } - -LValue elementLV = CGF.MakeAddrLValue( -

[clang] [clang] Allow builtin addc/subc to be constant evaluated (PR #81656)

2024-02-13 Thread Bryce Wilson via cfe-commits
https://github.com/Bryce-MW updated https://github.com/llvm/llvm-project/pull/81656 >From 9bea6282aae73372a80aa3d0532ae0532b4ca948 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Fri, 9 Feb 2024 16:56:57 -0600 Subject: [PATCH] [clang] Allow builtin addc/subc to be constant evaluated ---

[clang] [clang] Allow builtin addc/subc to be constant evaluated (PR #81656)

2024-02-13 Thread Bryce Wilson via cfe-commits
https://github.com/Bryce-MW updated https://github.com/llvm/llvm-project/pull/81656 >From 6663b6269aad51ebf8cc0703d8594f0216cf5610 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Fri, 9 Feb 2024 16:56:57 -0600 Subject: [PATCH] [clang] Allow builtin addc/subc to be constant evaluated ---

[clang] [clang] Allow builtin addc/subc to be constant evaluated (PR #81656)

2024-02-13 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 79fec2f8ba8ea0b0b1c2f13fb6355cb395e1d3af a49372838fdbd4c908cddcbe0144ffaf0a83991d --

[clang] [C23] Do not diagnose binary literals as an extension (PR #81658)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes We previously would diagnose them as a GNU extension in C mode, but they are now a feature of C23. This removes the old warning group, -Wgnu-binary-literal, as it no longer makes sense and searching

[clang] [clang] Allow builtin addc/subc to be constant evaluated (PR #81656)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bryce Wilson (Bryce-MW) Changes There is some overlap with `*_overflow` which have the same result as these functions with a carry in of zero, but the type inference and way of returning results is different so it didn't seem worth

[clang] [clang] Allow builtin addc/subc to be constant evaluated (PR #81656)

2024-02-13 Thread Bryce Wilson via cfe-commits
https://github.com/Bryce-MW created https://github.com/llvm/llvm-project/pull/81656 There is some overlap with `*_overflow` which have the same result as these functions with a carry in of zero, but the type inference and way of returning results is different so it didn't seem worth handling

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From e586ff3c73dff1f983aa4ec9838c17324e34087d Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-13 Thread Matt Arsenault via cfe-commits
@@ -356,6 +356,19 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes( if (NumVGPR != 0) F->addFnAttr("amdgpu-num-vgpr", llvm::utostr(NumVGPR)); } + + if (const auto *Attr = FD->getAttr()) { +uint32_t X = Attr->getNumWorkGroupsX(); +uint32_t Y =

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-13 Thread Erich Keane via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-13 Thread Jun Wang via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang

[clang] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-02-13 Thread David Li via cfe-commits
https://github.com/david-xl commented: Please add test cases. The clang user manual also needs update. https://github.com/llvm/llvm-project/pull/81545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Revert "[clang] Remove #undef alloca workaround" (PR #81649)

2024-02-13 Thread via cfe-commits
zeroomega wrote: > for my information, which version of Visual Studio are you using? To be precise, we don't use (not installed) full Visual Studio. We directly install Visual Studio build tools from VS2022. The MSVC version string is `14.34.31933` with Windows Kit `10.0.19041.0`

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/80089 >From 7774e4036ac1de7fdf5fe4c6b3208b492853ffc5 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jan 2024 23:28:42 + Subject: [PATCH 1/6] add signed-integer-wrap sanitizer ---

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Justin Stitt via cfe-commits
@@ -0,0 +1,77 @@ +// Check that -fsanitize=signed-integer-wrap instruments with -fwrapv +// RUN: %clang_cc1 -fwrapv -triple x86_64-apple-darwin -emit-llvm -o - %s -fsanitize=signed-integer-wrap | FileCheck %s --check-prefix=CHECKSIW + +// Check that

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

2024-02-13 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/80171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-13 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-02-13T14:25:56-05:00 New Revision: 3a48630a4b25d50abefd945742c247f17bd61156 URL: https://github.com/llvm/llvm-project/commit/3a48630a4b25d50abefd945742c247f17bd61156 DIFF:

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Kees Cook via cfe-commits
kees wrote: > > and likely in production kernels. :) > > I doubt you meant running in production.  I very much do -- I expect to use this like we use the array-bounds sanitizer, which is on in production in at least Ubuntu and Android. It may be a long road to getting sane coverage without

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-13 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: Sorry, I thought I had waited long enough and that the previous comments were addressed. Will address your comments in a follow-up. > This is good to go only because it's off by default. Otherwise it's not. > Sample PGO profile has inline context, so in the profile, we may

[clang] Revert "[clang] Remove #undef alloca workaround" (PR #81649)

2024-02-13 Thread via cfe-commits
Prabhuk wrote: We don't use MSVC. CC: @zeroomega https://github.com/llvm/llvm-project/pull/81649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] 9dd2c59 - InstCombine: Enable SimplifyDemandedUseFPClass and remove flag (#81108)

2024-02-13 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-02-14T00:28:46+05:30 New Revision: 9dd2c59312bfae3526cee5e836a6b67b2e9b4989 URL: https://github.com/llvm/llvm-project/commit/9dd2c59312bfae3526cee5e836a6b67b2e9b4989 DIFF:

[clang] Revert "[clang] Remove #undef alloca workaround" (PR #81649)

2024-02-13 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: for my information, which version of Visual Studio are you using? https://github.com/llvm/llvm-project/pull/81649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang] Remove #undef alloca workaround" (PR #81649)

2024-02-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/81649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f79f58d - Revert "[clang] Remove #undef alloca workaround" (#81649)

2024-02-13 Thread via cfe-commits
Author: Prabhuk Date: 2024-02-13T10:57:39-08:00 New Revision: f79f58d5f1be370ccc212236e1c10b55835eb3c7 URL: https://github.com/llvm/llvm-project/commit/f79f58d5f1be370ccc212236e1c10b55835eb3c7 DIFF: https://github.com/llvm/llvm-project/commit/f79f58d5f1be370ccc212236e1c10b55835eb3c7.diff LOG:

[clang] Revert "[clang] Remove #undef alloca workaround" (PR #81649)

2024-02-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. https://github.com/llvm/llvm-project/pull/81649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang] Remove #undef alloca workaround" (PR #81649)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Prabhuk (Prabhuk) Changes Reverts llvm/llvm-project#81534 llvm/llvm-project#81534 breaks building (Fuchsia) Clang toolchain on Windows. Log:

[clang] Revert "[clang] Remove #undef alloca workaround" (PR #81649)

2024-02-13 Thread via cfe-commits
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/81649 Reverts llvm/llvm-project#81534 llvm/llvm-project#81534 breaks building (Fuchsia) Clang toolchain on Windows. Log:

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-13 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: Part of that confusion comes from SPARC's own naming. V9 is the CPU, but a V9 CPU being used for 32-bit code is called V8+... https://github.com/llvm/llvm-project/pull/73176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [NFC] Add API documentation and annotations (PR #78635)

2024-02-13 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/78635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-13 Thread James Y Knight via cfe-commits
jyknight wrote: What config is this bot using? Is it "-target sparc-solaris -mcpu=v9" (that is: 32-bit sparc, but with v9 cpu available)? I see that SparcV9TargetInfo sets MaxAtomicInlineWidth to 64 unconditionally. But, the message `warning: large atomic operation may incur significant

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,77 @@ +// Check that -fsanitize=signed-integer-wrap instruments with -fwrapv nickdesaulniers wrote: > I must be doing something wrong because it suggests I remove all my Check: > ...'s and replace them with Check: {{.*}} Huh, indeed. I can repro.

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers edited https://github.com/llvm/llvm-project/pull/80089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers commented: PATCH mostly LGTM UBSan is documented clang/docs/UndefinedBehaviorSanitizer.rst https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html Please make sure to update the list [of available

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -3554,12 +3572,20 @@ Value *ScalarExprEmitter::EmitOverflowCheckedBinOp(const BinOpInfo ) { const std::string *handlerName = ().OverflowHandler; if (handlerName->empty()) { -// If the signed-integer-overflow sanitizer is enabled, emit a call to its -//

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,77 @@ +// Check that -fsanitize=signed-integer-wrap instruments with -fwrapv +// RUN: %clang_cc1 -fwrapv -triple x86_64-apple-darwin -emit-llvm -o - %s -fsanitize=signed-integer-wrap | FileCheck %s --check-prefix=CHECKSIW + +// Check that

[clang] [clang] Remove #undef alloca workaround (PR #81534)

2024-02-13 Thread via cfe-commits
Prabhuk wrote: Hi, this change seems to break building (Fuchsia) Clang toolchain on Windows. Log: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8756186536543250705/+/u/clang/install/stdout Builder:

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

2024-02-13 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/80171 >From 5de10ae0864dacf5f48daf476a4fa20177545d9b 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] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-02-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Precommit CI seems to have found some related failures that should be investigated. I'd love to hear opinions from the codegen code owners on this, as well as @zygoloid as UBSan code owner. I'm not opposed to the changes, though I do find it somewhat strange to add them to

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Our current method of storing the template arguments as written for `(Class/Var)Template(Partial)SpecializationDecl` suffers from a number of flaws: - We use

[clang] [HLSL] Vector standard conversions (PR #71098)

2024-02-13 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. Thanks, LGTM https://github.com/llvm/llvm-project/pull/71098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-13 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/81642 Our current method of storing the template arguments as written for `(Class/Var)Template(Partial)SpecializationDecl` suffers from a number of flaws: - We use `TypeSourceInfo` to store `TemplateArgumentLocs`

[clang-tools-extra] [clangd] fix extract-to-function for overloaded operators (PR #81640)

2024-02-13 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/81640 >From c9886f24d53de59f11028dc06c56a96ef5896e0e Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Tue, 13 Feb 2024 18:59:16 +0100 Subject: [PATCH 1/2] [clangd] fix extract-to-function for overloaded operators

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-13 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Looks like a bug in the SPARC backend. https://github.com/llvm/llvm-project/pull/73176#pullrequestreview-1811677691 indicated that atomic expansion was working correctly for all backends, but I guess it isn't working correctly on SPARC.

[clang-tools-extra] [clangd] fix extract-to-function for overloaded operators (PR #81640)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Julian Schmidt (5chmidti) Changes When selecting code that contains the use of overloaded operators, the SelectionTree will attribute the operator to the operator declaration, not to the `CXXOperatorCallExpr`. To allow extract-to-function

[clang-tools-extra] [clangd] fix extract-to-function for overloaded operators (PR #81640)

2024-02-13 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/81640 When selecting code that contains the use of overloaded operators, the SelectionTree will attribute the operator to the operator declaration, not to the `CXXOperatorCallExpr`. To allow extract-to-function to

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread Aaron Ballman via cfe-commits
@@ -114,6 +114,19 @@ C Language Changes C23 Feature Support ^^^ +- Corrected parsing behavior for the ``alignas`` specifier/qualifier in C23. We + previously handled it as an attribute as in C++, but there are parsing + differences. The behavioral

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread Aaron Ballman via cfe-commits
@@ -3518,8 +3518,24 @@ void Parser::ParseDeclarationSpecifiers( DS.Finish(Actions, Policy); return; -case tok::l_square: +// alignment-specifier +case tok::kw__Alignas: + if (!getLangOpts().C11) +Diag(Tok, diag::ext_c11_feature) <<

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread via cfe-commits
@@ -114,6 +114,19 @@ C Language Changes C23 Feature Support ^^^ +- Corrected parsing behavior for the ``alignas`` specifier/qualifier in C23. We + previously handled it as an attribute as in C++, but there are parsing + differences. The behavioral

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread via cfe-commits
@@ -3518,8 +3518,24 @@ void Parser::ParseDeclarationSpecifiers( DS.Finish(Actions, Policy); return; -case tok::l_square: +// alignment-specifier +case tok::kw__Alignas: + if (!getLangOpts().C11) +Diag(Tok, diag::ext_c11_feature) <<

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/81637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Fix handling of alignas (PR #81637)

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

[clang] [clang-tools-extra] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-02-13 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-02-13 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Ping https://github.com/llvm/llvm-project/pull/79867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-13 Thread Rainer Orth via cfe-commits
rorth wrote: The libcalls per se wouldn't be a problem since on 32-bit Solaris/sparc `-latomic` is always linked due to that. However, the `__sync_*` libcalls aren't defined in `libatomic.so`, thus the link failure. https://github.com/llvm/llvm-project/pull/73176

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes In C++, alignas is an attribute specifier, while in C23, it's an alias of _Alignas, which is a type specifier/qualifier. This means that they parse differently in some circumstances. Fixes

[clang] [C23] Fix handling of alignas (PR #81637)

2024-02-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/81637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -5155,7 +5155,39 @@ struct StrictFPUpgradeVisitor : public InstVisitor { }; } // namespace -void llvm::UpgradeFunctionAttributes(Function ) { +static void +CopyModuleAttributeToFunction(Function , StringRef FnAttrName, + StringRef ModAttrName,

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: Also, consider submitting your 3 commits as 3 distinct PRs. The first is ready to land. I think the auto upgrade could be detached from the inlining decisions. Also, I'm kind of surprised you didn't have to change anything in clang codegen of LLVM IR. Shouldn't clang

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: thanks for the patch! https://github.com/llvm/llvm-project/pull/80642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove #undef alloca workaround (PR #81534)

2024-02-13 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/81534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 742a06f - [clang] Remove #undef alloca workaround (#81534)

2024-02-13 Thread via cfe-commits
Author: Arthur Eubanks Date: 2024-02-13T09:49:22-08:00 New Revision: 742a06f577b4c3b1c1f994e91bb6579ae89fe4b0 URL: https://github.com/llvm/llvm-project/commit/742a06f577b4c3b1c1f994e91bb6579ae89fe4b0 DIFF:

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,43 @@ +; Testcase to check that module with different branch-target-enforcement can +; be mixed. +; +; RUN: llvm-as %s -o %t1.bc +; RUN: llvm-as %p/Inputs/foo.ll -o %t2.bc +; RUN: llvm-lto -exported-symbol main \ +; RUN: -exported-symbol foo \ +; RUN:

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -5155,7 +5155,39 @@ struct StrictFPUpgradeVisitor : public InstVisitor { }; } // namespace -void llvm::UpgradeFunctionAttributes(Function ) { +static void +CopyModuleAttributeToFunction(Function , StringRef FnAttrName, + StringRef ModAttrName,

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -5155,7 +5155,39 @@ struct StrictFPUpgradeVisitor : public InstVisitor { }; } // namespace -void llvm::UpgradeFunctionAttributes(Function ) { +static void +CopyModuleAttributeToFunction(Function , StringRef FnAttrName, + StringRef ModAttrName,

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -2110,6 +2110,21 @@ llvm::InlineResult llvm::InlineFunction(CallBase , InlineFunctionInfo , return InlineResult::failure("incompatible strictfp attributes"); } + // Do not inline function with a different signing scheme. + if

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -5155,7 +5155,39 @@ struct StrictFPUpgradeVisitor : public InstVisitor { }; } // namespace -void llvm::UpgradeFunctionAttributes(Function ) { +static void +CopyModuleAttributeToFunction(Function , StringRef FnAttrName, + StringRef ModAttrName,

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -1606,6 +1606,10 @@ Error IRLinker::run() { // Loop over all of the linked values to compute type mappings. computeTypeMapping(); + // Update function attributes before copy them to destation module. nickdesaulniers wrote: s/copy/copying/

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,126 @@ +; Check the inliner doesn't inline a function with different sign return address schemes. +; RUN: opt < %s -passes=inline -S | FileCheck %s + +declare void @init(ptr) + +define internal i32 @foo_all() #0 { + ret i32 43 +} + +define internal i32 @foo_nonleaf()

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,126 @@ +; Check the inliner doesn't inline a function with different sign return address schemes. +; RUN: opt < %s -passes=inline -S | FileCheck %s + +declare void @init(ptr) + +define internal i32 @foo_all() #0 { + ret i32 43 +} + +define internal i32 @foo_nonleaf()

[clang] [llvm] [llvm][AArch64] Do not inline a function with different signing scheme. (PR #80642)

2024-02-13 Thread Nick Desaulniers via cfe-commits
@@ -5167,6 +5199,41 @@ void llvm::UpgradeFunctionAttributes(Function ) { F.removeRetAttrs(AttributeFuncs::typeIncompatible(F.getReturnType())); for (auto : F.args()) Arg.removeAttrs(AttributeFuncs::typeIncompatible(Arg.getType())); + + if

[clang] [clang-tools-extra] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-02-13 Thread David Blaikie via cfe-commits
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2024-02-13 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/76548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9be7b0a - [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (#76548)

2024-02-13 Thread via cfe-commits
Author: Craig Topper Date: 2024-02-13T09:46:50-08:00 New Revision: 9be7b0a539f673081bf8d1d5a5b08135190fd46d URL: https://github.com/llvm/llvm-project/commit/9be7b0a539f673081bf8d1d5a5b08135190fd46d DIFF: https://github.com/llvm/llvm-project/commit/9be7b0a539f673081bf8d1d5a5b08135190fd46d.diff

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-13 Thread via cfe-commits
Logikable wrote: https://reviews.llvm.org/D118021 likely related, looking into this. https://github.com/llvm/llvm-project/pull/73176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread David Peixotto via cfe-commits
@@ -0,0 +1,202 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s +// RUN: %clang_cc1 -std=hlsl2021

[clang-tools-extra] [clangd] Extract Function: add hoisting support (PR #75533)

2024-02-13 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Ping https://github.com/llvm/llvm-project/pull/75533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,202 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s +// RUN: %clang_cc1 -std=hlsl2021

[clang] [analyzer] Fix core.VLASize checker false positive taint reports (PR #68140)

2024-02-13 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/68140 >From 4b310278d2923ff718d074a7f7c8806ad03c6401 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Tue, 3 Oct 2023 19:58:28 +0200 Subject: [PATCH 1/4] [analyzer] Fix core.VLASize checker false positive taint

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected + +float test_first_arg_is_not_vector (

[clang] [llvm] [MC/DC] Refactor: Introduce `ConditionIDs` as `std::array<2>` (PR #81221)

2024-02-13 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/81221 >From 66bb6cc3fd339360c16c6a98ce08f34978f665e0 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 9 Feb 2024 07:56:51 +0900 Subject: [PATCH 1/3] [MC/DC] Refactor: Introduce `ConditionIDs` as

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread David Peixotto via cfe-commits
@@ -144,6 +144,92 @@ double3 cos(double3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_cos) double4 cos(double4); +//===--===// +// dot product builtins

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

2024-02-13 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel approved this pull request. https://github.com/llvm/llvm-project/pull/81108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix core.VLASize checker false positive taint reports (PR #68140)

2024-02-13 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/68140 >From 4b310278d2923ff718d074a7f7c8806ad03c6401 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Tue, 3 Oct 2023 19:58:28 +0200 Subject: [PATCH 1/3] [analyzer] Fix core.VLASize checker false positive taint

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread David Peixotto via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected + +float test_first_arg_is_not_vector (

[clang] [llvm] [HLSL] Implementation of dot intrinsic (PR #81190)

2024-02-13 Thread David Peixotto via cfe-commits
@@ -0,0 +1,202 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s +// RUN: %clang_cc1 -std=hlsl2021

[clang] 7a5c1a4 - [clang][docs] Fix warning in LanguageExtensions

2024-02-13 Thread David Spickett via cfe-commits
Author: David Spickett Date: 2024-02-13T16:39:59Z New Revision: 7a5c1a4abc750fef335c2ee5191d59ebe9e4bf18 URL: https://github.com/llvm/llvm-project/commit/7a5c1a4abc750fef335c2ee5191d59ebe9e4bf18 DIFF: https://github.com/llvm/llvm-project/commit/7a5c1a4abc750fef335c2ee5191d59ebe9e4bf18.diff

<    1   2   3   4   5   >