[clang] [clang] AST Visitor: skip empty qualifiers in QualifiedTemplateName (PR #93926)

2024-05-30 Thread Matheus Izvekov via cfe-commits
@@ -855,10 +855,14 @@ bool RecursiveASTVisitor::TraverseDeclarationNameInfo( template bool RecursiveASTVisitor::TraverseTemplateName(TemplateName Template) { - if (DependentTemplateName *DTN = Template.getAsDependentTemplateName()) + if (DependentTemplateName *DTN = Templ

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I wonder if compile-time regressions come from new translation units I add, because they definitely include stuff. https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] 63dc31b - Reapply [IR] Avoid creating icmp/fcmp constant expressions (#92885)

2024-05-30 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2024-05-31T08:55:59+02:00 New Revision: 63dc31b68b78bc0e5deef21b98cab72de997c471 URL: https://github.com/llvm/llvm-project/commit/63dc31b68b78bc0e5deef21b98cab72de997c471 DIFF: https://github.com/llvm/llvm-project/commit/63dc31b68b78bc0e5deef21b98cab72de997c471.diff

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-30 Thread via cfe-commits
cor3ntin wrote: Can you add a test for https://github.com/llvm/llvm-project/issues/88896 ? https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang] AST Visitor: skip empty qualifiers in QualifiedTemplateName (PR #93926)

2024-05-30 Thread via cfe-commits
@@ -855,10 +855,14 @@ bool RecursiveASTVisitor::TraverseDeclarationNameInfo( template bool RecursiveASTVisitor::TraverseTemplateName(TemplateName Template) { - if (DependentTemplateName *DTN = Template.getAsDependentTemplateName()) + if (DependentTemplateName *DTN = Templ

[clang] [clang] AST Visitor: skip empty qualifiers in QualifiedTemplateName (PR #93926)

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

[clang] [clang] AST Visitor: skip empty qualifiers in QualifiedTemplateName (PR #93926)

2024-05-30 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM (modulo suggestion) https://github.com/llvm/llvm-project/pull/93926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] AST Visitor: skip empty qualifiers in QualifiedTemplateName (PR #93926)

2024-05-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/93926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ConstantFold] Remove non-trivial gep-of-gep fold (PR #93823)

2024-05-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/93823 >From 7fbc0366638de3262294c1923a1b45aa6338fe8f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 30 May 2024 09:57:21 +0200 Subject: [PATCH 1/2] [ConstantFold] Remove non-trivial gep-of-gep fold This fold is s

[clang-tools-extra] [llvm] Clang doc test (PR #93928)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) Changes issue: https://github.com/llvm/llvm-project/issues/93925 --- Patch is 26.87 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/93928.diff 10 Files Affected:

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-30 Thread Nishith Kumar M Shah via cfe-commits
nishithshah2211 wrote: @cor3ntin Thanks for reviewing. I updated the PR to get the tests/build passing. Please take a look when you get a chance. https://github.com/llvm/llvm-project/pull/93753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang-tools-extra] [llvm] Clang doc test (PR #93928)

2024-05-30 Thread via cfe-commits
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/93928 issue: https://github.com/llvm/llvm-project/issues/93925 >From a4141043cb67a8396a82724f4d5d0ec3db0cdfe6 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 30 May 2024 22:22:02 -0400 Subject: [PATCH 1/3] [cl

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/93804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 089dfee - [X86] Add support for MS inp functions. (#93804)

2024-05-30 Thread via cfe-commits
Author: Malay Sanghi Date: 2024-05-31T14:11:33+08:00 New Revision: 089dfeee8a8761c35a3a56e75281275871dd53bc URL: https://github.com/llvm/llvm-project/commit/089dfeee8a8761c35a3a56e75281275871dd53bc DIFF: https://github.com/llvm/llvm-project/commit/089dfeee8a8761c35a3a56e75281275871dd53bc.diff

[clang] [clang] AST Visitor: skip empty qualifiers in QualifiedTemplateName (PR #93926)

2024-05-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/93926 >From 55d946648a44e7a0b2fc45d20866f29ef4528c15 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 31 May 2024 02:53:18 -0300 Subject: [PATCH] [clang] AST Visitor: skip empty qualifiers in QualifiedTempla

[clang] [clang] AST Visitor: skip empty qualifiers in QualifiedTemplateName (PR #93926)

2024-05-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/93926 >From db56ac3130164f570942d54686ffb39cf7d2ae33 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 31 May 2024 02:53:18 -0300 Subject: [PATCH] [clang] AST Visitor: skip empty qualifiers in QualifiedTempla

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Mildly curious that there isn't a SemaX86? > > Doh, there already is one. Don't mind me. This PR was based on the success with X86 and RISCV. https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing list cfe-commits@li

[clang] [libcxx] [clang] Preserve Qualifiers and type sugar in TemplateNames (PR #93433)

2024-05-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @pcc https://github.com/llvm/llvm-project/pull/93926 should fix it, can you double check that it gets all issues? https://github.com/llvm/llvm-project/pull/93433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/93804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
@@ -329,6 +329,25 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst, static __inline__ void __DEFAULT_FN_ATTRS __halt(void) { __asm__ volatile("hlt"); } + +static inline int _inp(unsigned short port) { + int ret; + __asm__ volatile("inb %w1, %b0"

[clang] [clang] AST Visitor: skip empty qualifiers in QualifiedTemplateName (PR #93926)

2024-05-30 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 c5fdb5c34e0dc3f5f3c0db19cf704b30a778cd0e dd8839b4f3294241b2a6df8bc10e869176baff72 --

[clang] [clang] AST Visitor: skip empty qualifiers in QualifiedTemplateName (PR #93926)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This change was missed in #93433. --- Full diff: https://github.com/llvm/llvm-project/pull/93926.diff 1 Files Affected: - (modified) clang/include/clang/AST/RecursiveASTVisitor.h (+6-3) ``di

[clang] [clang] AST Visitor: skip empty qualifiers in QualifiedTemplateName (PR #93926)

2024-05-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/93926 This change was missed in #93433. >From dd8839b4f3294241b2a6df8bc10e869176baff72 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 31 May 2024 02:53:18 -0300 Subject: [PATCH] [clang] AST Visitor: skip e

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
@@ -329,6 +329,25 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst, static __inline__ void __DEFAULT_FN_ATTRS __halt(void) { __asm__ volatile("hlt"); } + +static inline int _inp(unsigned short port) { + int ret; + __asm__ volatile("inb %w1, %b0"

[clang] [clang] Add arm64e ABI-defined key assignments to ptrauth.h. (PR #93901)

2024-05-30 Thread Anton Korobeynikov via cfe-commits
@@ -15,6 +15,29 @@ typedef enum { ptrauth_key_asib = 1, ptrauth_key_asda = 2, ptrauth_key_asdb = 3, + +#ifdef __APPLE__ asl wrote: I believe these are defaults for ELF as well. So, I'd remove ifdef and decide on necessary gating when there will be a pre

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
https://github.com/MalaySanghi edited https://github.com/llvm/llvm-project/pull/93804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
https://github.com/MalaySanghi updated https://github.com/llvm/llvm-project/pull/93804 >From de79bf75b68825440b939f030e1d659d26f3d2ea Mon Sep 17 00:00:00 2001 From: Malay Sanghi Date: Thu, 30 May 2024 01:39:41 -0700 Subject: [PATCH 1/5] Add support for MS inp functions. support _inp, _inpw, _i

[clang] [clang][ASTImport] fix issue on anonymous enum import (PR #93923)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes Don't skip searching in `ToContext` during importing `EnumDecl`. And `IsStructuralMatch` in `StructralEquivalence` can make sure to determine whether the found result is match or not. --- Full diff: https://gith

[clang] [clang][ASTImport] fix issue on anonymous enum import (PR #93923)

2024-05-30 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/93923 Don't skip searching in `ToContext` during importing `EnumDecl`. And `IsStructuralMatch` in `StructralEquivalence` can make sure to determine whether the found result is match or not. >From 7e602ae8d3c7ca0c3218d

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
@@ -329,6 +329,28 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst, static __inline__ void __DEFAULT_FN_ATTRS __halt(void) { __asm__ volatile("hlt"); } + +static inline int _inp(unsigned short port) { + int ret; + __asm__ volatile("inb %w1, %b0"

[clang] [clang-format] Insert a space between a keyword and a literal (PR #93632)

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

[clang] c5fdb5c - [clang-format] Insert a space between a keyword and a literal (#93632)

2024-05-30 Thread via cfe-commits
Author: Owen Pan Date: 2024-05-30T22:13:00-07:00 New Revision: c5fdb5c34e0dc3f5f3c0db19cf704b30a778cd0e URL: https://github.com/llvm/llvm-project/commit/c5fdb5c34e0dc3f5f3c0db19cf704b30a778cd0e DIFF: https://github.com/llvm/llvm-project/commit/c5fdb5c34e0dc3f5f3c0db19cf704b30a778cd0e.diff LOG:

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Phoebe Wang via cfe-commits
@@ -329,6 +329,28 @@ static __inline__ void __DEFAULT_FN_ATTRS __stosq(unsigned __int64 *__dst, static __inline__ void __DEFAULT_FN_ATTRS __halt(void) { __asm__ volatile("hlt"); } + +static inline int _inp(unsigned short port) { + int ret; + __asm__ volatile("inb %w1, %b0"

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

2024-05-30 Thread Vikram Hegde via cfe-commits
@@ -5461,8 +5461,7 @@ bool AMDGPULegalizerInfo::legalizeLaneOp(LegalizerHelper &Helper, SmallVector PartialRes; unsigned NumParts = Size / 32; - MachineInstrBuilder Src0Parts, Src2Parts; - Src0Parts = B.buildUnmerge(PartialResTy, Src0); + MachineInstrBuilder Src0Parts

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
@@ -63,6 +63,47 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { // CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]] // CHECK: ret i64 [[RES]] + +int test_inp(unsigned short port) { + return _inp(port); +} +// CHECK-LABEL: i32 @test_inp(i16 noundef +// CHEC

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-30 Thread Malay Sanghi via cfe-commits
https://github.com/MalaySanghi updated https://github.com/llvm/llvm-project/pull/93804 >From de79bf75b68825440b939f030e1d659d26f3d2ea Mon Sep 17 00:00:00 2001 From: Malay Sanghi Date: Thu, 30 May 2024 01:39:41 -0700 Subject: [PATCH 1/4] Add support for MS inp functions. support _inp, _inpw, _i

[clang] [llvm] Intrinsic: introduce minimumnum and maximumnum (PR #93841)

2024-05-30 Thread YunQiang Su via cfe-commits
wzssyqa wrote: TODO: implement for architectures that don't have `fmin/fmax` instructions: This is the example of MIPS pre-R6: ``` mins: .setnoreorder .setnomacro mtc1$0,$f1 add.s $f0,$f12,$f1 add.s $f13,$f13,$f1 c.un.s $fcc0,$f0

[clang-tools-extra] [clang-tidy] In C++17, callee is guaranteed to be sequenced before arguments. (PR #93623)

2024-05-30 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov updated https://github.com/llvm/llvm-project/pull/93623 >From 14106f8d990c068f9f75e1ea6a1f10c4be5930f6 Mon Sep 17 00:00:00 2001 From: martinboehme Date: Wed, 29 May 2024 07:23:35 +0800 Subject: [PATCH] [clang-tidy] Let bugprone-use-after-move ignore the moved variab

[clang] [llvm] [clang][CodeGen] Global constructors/destructors are globals (PR #93914)

2024-05-30 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: The third argument here is like for llvm.used, it's a way to associate the entry with a global or function. If the corresponding global or function is omitted from the output then the entry will be removed. It isn't used for anything at run time. So I think there should be a cons

[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

2024-05-30 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only \ +// RUN: -isystem %S/Inputs -verify %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only \ +// RUN: -isystem %S/Inputs -fcuda-is-device -verify %s +// RUN: %clang_cc1 -triple x86_

[clang] [llvm] Intrinsic: introduce minimumnum and maximumnum (PR #93841)

2024-05-30 Thread YunQiang Su via cfe-commits
wzssyqa wrote: @peterwaller-arm I noticed that in `llvm/test/CodeGen/AArch64/combine_andor_with_cmps.ll`, `FMAXNUM_IEEE` is claimed that it is not supported. While I noticed that `fmaxnm` follows the rules of `maxNUM` of IEEE754-2008. Is there any other limitation of `fmaxnm`? https://github.

[clang] [llvm] [clang][CodeGen] Global constructors/destructors are globals (PR #93914)

2024-05-30 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/93914 >From 34b9646a38c6bdd0419dd9d2eb1bc847c4d16596 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 28 May 2024 20:09:15 +0100 Subject: [PATCH 1/8] Fix `emitUsed` to place `used` globals in the Global AS. Update

[clang] [llvm] [clang][CodeGen] Global constructors/destructors are globals (PR #93914)

2024-05-30 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/93914 >From 34b9646a38c6bdd0419dd9d2eb1bc847c4d16596 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 28 May 2024 20:09:15 +0100 Subject: [PATCH 1/8] Fix `emitUsed` to place `used` globals in the Global AS. Update

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-30 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Mildly curious that there isn't a SemaX86? https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-05-30 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/93601 >From 34b9646a38c6bdd0419dd9d2eb1bc847c4d16596 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 28 May 2024 20:09:15 +0100 Subject: [PATCH 1/4] Fix `emitUsed` to place `used` globals in the Global AS. Update

[clang] [libcxx] [clang] Preserve Qualifiers and type sugar in TemplateNames (PR #93433)

2024-05-30 Thread via cfe-commits
pcc wrote: This commit broke the UBSan buildbot: https://lab.llvm.org/buildbot/#/builders/85/builds/24378 Can you please take a look? https://github.com/llvm/llvm-project/pull/93433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-30 Thread Artem Yurchenko via cfe-commits
temyurchenko wrote: > No worries, and I reverted it for you. When you have the fix ready, I'm happy > to verify it on our builders before you reland. Can you also reopen this PR, please? For documentation/history reasons, it's probably better to provide a fix within the scope of this PR. http

[clang] [llvm] [clang][CodeGen] Global constructors/destructors are globals (PR #93914)

2024-05-30 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: llvm datalayout defines P - program addr space for functions G - global addr space for global variables https://llvm.org/docs/LangRef.html#langref-datalayout should we use P for llvm.global_ctors instead of G? https://github.com/llvm/llvm-project/pull/93914 __

[clang] [llvm] [clang][CodeGen] Global constructors/destructors are globals (PR #93914)

2024-05-30 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 aa98c75da49515fb399e2682dfe34c563d44bdf6 b41326be998e0f78db335dc6298144f805ab0d56 --

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-05-30 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/93612 >From 27a71386b03cd3d7e92b7add0661cc4f299319d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Fri, 24 May 2024 11:39:35 -0400 Subject: [PATCH] [ubsan] Display correct runti

[clang] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-05-30 Thread Alex Voicu via cfe-commits
@@ -2047,9 +2047,9 @@ void CodeGenModule::EmitCtorList(CtorList &Fns, const char *GlobalName) { llvm::Type *CtorPFTy = llvm::PointerType::get(CtorFTy, TheModule.getDataLayout().getProgramAddressSpace()); - // Get the type of a ctor entry, { i32, void ()*, i8* }.

[clang] [llvm] [clang][CodeGen] Global constructors/destructors are globals (PR #93914)

2024-05-30 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/93914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Global constructors/destructors are globals (PR #93914)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Alex Voicu (AlexVlx) Changes Currently the payload for global ctors/dtors is passed as an unqualified pointer, which relies on the target being reasonable regarding what AS 0 means, and also is overly conservative. This change cor

[clang] [llvm] Global constructors/destructors are globals (PR #93914)

2024-05-30 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/93914 Currently the payload for global ctors/dtors is passed as an unqualified pointer, which relies on the target being reasonable regarding what AS 0 means, and also is overly conservative. This change correctly pla

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-05-30 Thread Chuanqi Xu via cfe-commits
@@ -1802,6 +1802,12 @@ void ItaniumCXXABI::emitVTableDefinitions(CodeGenVTables &CGVT, if (VTable->hasInitializer()) return; + // If the class is attached to a C++ named module other than the one + // we're currently compiling, the vtable should be defined there. + i

[clang] [clang] Add arm64e ABI-defined key assignments to ptrauth.h. (PR #93901)

2024-05-30 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak approved this pull request. https://github.com/llvm/llvm-project/pull/93901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-05-30 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko edited https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] fix ast-print of extern with >=2 declarators, retry (PR #93913)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Artem Yurchenko (temyurchenko) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/93913.diff 2 Files Affected: - (modified) clang/lib/AST/DeclPrinter.cpp (+35-14) - (added) clang/test/AST/ast-print-language-linkage.cpp (

[clang] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-05-30 Thread Yaxun Liu via cfe-commits
@@ -2928,12 +2928,13 @@ static void emitUsed(CodeGenModule &CGM, StringRef Name, for (unsigned i = 0, e = List.size(); i != e; ++i) { UsedArray[i] = llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast( -cast(&*List[i]), CGM.Int8PtrTy); ---

[clang] [clang][AST] fix ast-print of extern with >=2 declarators, retry (PR #93913)

2024-05-30 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko created https://github.com/llvm/llvm-project/pull/93913 None >From fac45476736cd04f044f046fd0df9e59450a926b Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Wed, 22 May 2024 23:41:35 -0400 Subject: [PATCH 1/2] [clang][AST] fix ast-print of `extern ` with >=2

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-30 Thread via cfe-commits
gulfemsavrun wrote: > Unfortunately, I don't have the right to revert. No worries, and I reverted for you. When you have the fix ready, I'm happy to verify it on our builders before you reland. https://github.com/llvm/llvm-project/pull/93131 ___ cfe

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-05-30 Thread Chuanqi Xu via cfe-commits
@@ -1180,6 +1185,21 @@ bool CodeGenVTables::isVTableExternal(const CXXRecordDecl *RD) { TSK == TSK_ExplicitInstantiationDefinition) return false; + // Itanium C++ ABI [5.2.3]: + // Virtual tables for dynamic classes are emitted as follows: + // + // - If the cla

[clang] Revert "[clang][AST] fix ast-print of `extern ` with >=2 declarators" (PR #93912)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (gulfemsavrun) Changes Reverts llvm/llvm-project#93131 because it broke some lldb tests on the Fuchsia Clang toolchain builders. https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8746482644341901905/infra --

[clang] aa98c75 - Revert "[clang][AST] fix ast-print of `extern ` with >=2 declarators" (#93912)

2024-05-30 Thread via cfe-commits
Author: gulfemsavrun Date: 2024-05-30T18:51:52-07:00 New Revision: aa98c75da49515fb399e2682dfe34c563d44bdf6 URL: https://github.com/llvm/llvm-project/commit/aa98c75da49515fb399e2682dfe34c563d44bdf6 DIFF: https://github.com/llvm/llvm-project/commit/aa98c75da49515fb399e2682dfe34c563d44bdf6.diff

[clang] Revert "[clang][AST] fix ast-print of `extern ` with >=2 declarators" (PR #93912)

2024-05-30 Thread via cfe-commits
https://github.com/gulfemsavrun closed https://github.com/llvm/llvm-project/pull/93912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang][AST] fix ast-print of `extern ` with >=2 declarators" (PR #93912)

2024-05-30 Thread via cfe-commits
https://github.com/gulfemsavrun created https://github.com/llvm/llvm-project/pull/93912 Reverts llvm/llvm-project#93131 because it broke some lldb tests on the Fuchsia Clang toolchain builders. https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8746482644341901905/infra

[clang] [clang] ``README.txt``: Replace the link to the old bug tracker with the new one. (PR #93878)

2024-05-30 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 approved this pull request. https://github.com/llvm/llvm-project/pull/93878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-05-30 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: Sorry, I was OOO, thanks for the fix! https://github.com/llvm/llvm-project/pull/92338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add arm64e ABI-defined key assignments to ptrauth.h. (PR #93901)

2024-05-30 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha edited https://github.com/llvm/llvm-project/pull/93901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-05-30 Thread Alex Voicu via cfe-commits
@@ -1,4 +1,5 @@ ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s +; RUN: llc -O0 -mtriple=spirv64-amd-amdhsa %s -o - | FileCheck %s AlexVlx wrote: Yup, you are right; my thinking was to prevent anyone getting ideas and diverging the "flavo

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-30 Thread Artem Yurchenko via cfe-commits
temyurchenko wrote: > We started seeing an lldb test failure, and I bisected to this commit: I see the source of the bug, I'm thinking how to address it best. If it's urgent, I can produce an urgent fix. https://github.com/llvm/llvm-project/pull/93131 __

[clang] [clang] Add arm64e ABI-defined key assignments to ptrauth.h. (PR #93901)

2024-05-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ahmed Bougacha (ahmedbougacha) Changes These are currently gated by __APPLE__; we can figure out a way to define these on ELF targets as well, and maybe have them be defined by clang itself, depending on ABI modes. --- Full diff: https:/

[clang] [clang] Add arm64e ABI-defined key assignments to ptrauth.h. (PR #93901)

2024-05-30 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha created https://github.com/llvm/llvm-project/pull/93901 These are currently gated by __APPLE__; we can figure out a way to define these on ELF targets as well, and maybe have them be defined by clang itself, depending on ABI modes. >From fc8f76b404b25951dc10ec

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-05-30 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/93612 >From a128cd4fd591fec2c830fb24503606e9342a19c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Fri, 24 May 2024 11:39:35 -0400 Subject: [PATCH] [ubsan] Display correct runti

[clang] [clang] Fix a crash when a variable is captured by a block nested inside a lambda (PR #93749)

2024-05-30 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/93749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e1c3e16 - [clang] Fix a crash when a variable is captured by a block nested inside a lambda (#93749)

2024-05-30 Thread via cfe-commits
Author: Akira Hatanaka Date: 2024-05-30T16:52:37-07:00 New Revision: e1c3e16d24b5cc097ff08e9283f53319acd3f245 URL: https://github.com/llvm/llvm-project/commit/e1c3e16d24b5cc097ff08e9283f53319acd3f245 DIFF: https://github.com/llvm/llvm-project/commit/e1c3e16d24b5cc097ff08e9283f53319acd3f245.diff

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-05-30 Thread via cfe-commits
=?utf-8?q?Eänolituri_Lómitaurë?Message-ID: In-Reply-To: https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/93612 >From 1d58ee62ddf4ebf4f8f21b47e7240d3df9ef4ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Fri, 24 May 2024 11:

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-05-30 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/93612 >From 8e0e81f74f13037ad48f2f4cc4324afa012c6e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Fri, 24 May 2024 11:39:35 -0400 Subject: [PATCH] [ubsan] Display correct runti

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-05-30 Thread via cfe-commits
=?utf-8?q?Eänolituri_Lómitaurë?Message-ID: In-Reply-To: https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/93612 >From 1d58ee62ddf4ebf4f8f21b47e7240d3df9ef4ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Fri, 24 May 2024 11:

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-05-30 Thread via cfe-commits
=?utf-8?q?Eänolituri_Lómitaurë?Message-ID: In-Reply-To: https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/93612 >From 1d58ee62ddf4ebf4f8f21b47e7240d3df9ef4ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Fri, 24 May 2024 11:

[clang] [compiler-rt] [lldb] [llvm] Reapply "[Support] Remove terminfo dependency (#92865)" (PR #93889)

2024-05-30 Thread Aaron Siddhartha Mondal via cfe-commits
https://github.com/aaronmondal closed https://github.com/llvm/llvm-project/pull/93889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [lldb] [llvm] Reapply "[Support] Remove terminfo dependency (#92865)" (PR #93889)

2024-05-30 Thread Aaron Siddhartha Mondal via cfe-commits
https://github.com/aaronmondal edited https://github.com/llvm/llvm-project/pull/93889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-30 Thread via cfe-commits
gulfemsavrun wrote: We started seeing an lldb test failure, and I bisected to this commit: ``` -- Command Output (stderr): -- FAIL: LLDB (/b/s/w/ir/x/w/llvm_build/bin/clang-x86_64) :: test_completions (TestDAP_completions.TestDAP_completions.test_completions) FAIL: LLDB (/b/s/w/ir/x/w/llvm_build

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-05-30 Thread Nishith Kumar M Shah via cfe-commits
https://github.com/nishithshah2211 updated https://github.com/llvm/llvm-project/pull/93753 >From ae79ebec844a6a308bb370184eab892bd74e8fa1 Mon Sep 17 00:00:00 2001 From: Nishith Shah Date: Wed, 29 May 2024 12:34:52 -0700 Subject: [PATCH] Pass LangOpts from CompilerInstance to DependencyScanning

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-05-30 Thread via cfe-commits
=?utf-8?q?Eänolituri_Lómitaurë?Message-ID: In-Reply-To: https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/93612 >From 1d58ee62ddf4ebf4f8f21b47e7240d3df9ef4ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Fri, 24 May 2024 11:

[clang] [llvm] [MC] Make UseAssemblerInfoForParsing mostly true (PR #91082)

2024-05-30 Thread via cfe-commits
gulfemsavrun wrote: > @gulfemsavrun Commit > [245491a](https://github.com/llvm/llvm-project/commit/245491a9f384e4c53421196533c2a2b693efaf8d) > (`[MC] Disable MCAssembler based constant folding for DwarfDebug`; > independent of this patch) should have fixed the compile time regression. > Might

[clang] [compiler-rt] [lldb] [llvm] Reapply "[Support] Remove terminfo dependency (#92865)" (PR #93889)

2024-05-30 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/93889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [lldb] [llvm] Reapply "[Support] Remove terminfo dependency (#92865)" (PR #93889)

2024-05-30 Thread Fangrui Song via cfe-commits
MaskRay wrote: Consider copying the original description to ensure that the linked issues will be properly closed. https://github.com/llvm/llvm-project/pull/93889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-05-30 Thread via cfe-commits
=?utf-8?q?Eänolituri_Lómitaurë?Message-ID: In-Reply-To: https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/93612 >From 1d58ee62ddf4ebf4f8f21b47e7240d3df9ef4ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Fri, 24 May 2024 11:

[clang] d4ff961 - Add missing #include for ObjCMethodDecl.

2024-05-30 Thread Jorge Gorbe Moya via cfe-commits
Author: Jorge Gorbe Moya Date: 2024-05-30T15:42:57-07:00 New Revision: d4ff9615a1531f4a466b7d1fb0f175e3ae489289 URL: https://github.com/llvm/llvm-project/commit/d4ff9615a1531f4a466b7d1fb0f175e3ae489289 DIFF: https://github.com/llvm/llvm-project/commit/d4ff9615a1531f4a466b7d1fb0f175e3ae489289.di

[clang] [llvm] [MC] Make UseAssemblerInfoForParsing mostly true (PR #91082)

2024-05-30 Thread Fangrui Song via cfe-commits
MaskRay wrote: > We started seeing a build time regression in our Clang toolchain builders on > Mac, and I bisected to this commit: > > 1. Build step took 1.7 hours in the last build before (clang -> build) > > [luci-milo.appspot.com/ui/p/fuchsia/builders/prod/clang-mac-x64/b874743907285139

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-05-30 Thread Eli Friedman via cfe-commits
@@ -1062,6 +1063,160 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, return Builder.CreateSelect(Cmp, Res, ConstantInt::get(ResType, 0, IsSigned)); } +namespace { + +class ObjectSizeVisitor +: public ConstStmtVisitor { + ASTContext &Ctx;

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-05-30 Thread Eli Friedman via cfe-commits
@@ -1062,6 +1063,159 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, return Builder.CreateSelect(Cmp, Res, ConstantInt::get(ResType, 0, IsSigned)); } +namespace { + +class ObjectSizeVisitor +: public ConstStmtVisitor { + bool SkipASE; + +

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-05-30 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/93873 >From e638448bce1dd529acbf81592f324bdc1ecb3e19 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 28 May 2024 07:42:06 -0400 Subject: [PATCH 1/3] [Clang][Sema] Diagnose variable template explicit s

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

2024-05-30 Thread Matt Arsenault via cfe-commits
@@ -5461,8 +5461,7 @@ bool AMDGPULegalizerInfo::legalizeLaneOp(LegalizerHelper &Helper, SmallVector PartialRes; unsigned NumParts = Size / 32; - MachineInstrBuilder Src0Parts, Src2Parts; - Src0Parts = B.buildUnmerge(PartialResTy, Src0); + MachineInstrBuilder Src0Parts

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

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

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

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

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Thank you for letting me know! Given the amount of positive feedback I've heard about this effort, I think we'll continue, trying to claw back the compile times elsewhere (my recent patch that removed try_compile checks from CMake should've helped, even if it's not counted in yo

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-30 Thread Samuel Marks via cfe-commits
@@ -74,8 +74,8 @@ On Unix-like Systems https://llvm.org/docs/CMake.html#frequently-used-cmake-variables";>frequently used cmake variables for more options. -cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-05-30 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @mizvekov GCC seems to be right; [[decl.meaning.general] p3.3](eel.is/c++draft/dcl.meaning.general#3.3) requires that the specialized declaration be nominable (per [[basic.scope.scope] p7](eel.is/c++draft/basic.scope.scope#7)) in `S` (which in this case is the global namespa

  1   2   3   4   5   >