[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-07 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-library -x hlsl -ast-dump -o - %s | FileCheck %s + +// CHECK-LABLE:FunctionDecl 0x{{[0-9a-f]+}} <{{.*}}> w0 'void ()' +// CHECK:HLSLWaveSizeAttr 0x{{[0-9a-f]+}} <{{.*}}> 128 0 0 + [numthreads(8,8,1)] + [WaveSize(

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

2024-08-07 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,19 @@ +; RUN: opt -S -dxil-metadata-emit %s | FileCheck %s + +target triple = "dxilv1.3-unknown-shadermodel6.3-library" + +define void @"?f1@@YAXXZ"() #0 { +entry: + ret void +} + +define void @"?f2@MyNamespace@@YAXXZ"() #0 { +entry: + ret void +} + b

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: Thanks! The functional part LGTM, there are just a few nits. https://github.com/llvm/llvm-project/pull/102287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

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

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -790,6 +790,11 @@ class ASTReader /// the consumer eagerly. SmallVector EagerlyDeserializedDecls; + /// The IDs of all vtables to emit. The referenced declarations are passed + /// to the consumers's HandleVTable eagerly after passing mizvekov wrote:

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -12432,7 +12432,7 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { return false; // Variables in other module units shouldn't be forced to be emitted. - if (VD->isInAnotherModuleUnit()) + if (VD->shouldEmitInExternalSource()) mizvekov wrote:

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -5163,6 +5168,13 @@ void ASTWriter::PrepareWritingSpecialDecls(Sema &SemaRef) { // Write all of the DeclsToCheckForDeferredDiags. for (auto *D : SemaRef.DeclsToCheckForDeferredDiags) GetDeclRef(D); + + // Write all classes need to emit the vtable definitions if req

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -1216,6 +1228,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] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -1081,29 +1081,41 @@ llvm::GlobalVariable::LinkageTypes CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) { if (!RD->isExternallyVisible()) return llvm::GlobalVariable::InternalLinkage; - - // We're at the end of the translation unit, so the current key - // f

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -1124,20 +1124,36 @@ bool Decl::isInAnotherModuleUnit() const { if (!M) return false; + // FIXME or NOTE: maybe we need to be clear about the semantics + // of clang header modules. e.g., if this lives in a clang header + // module included by the current unit, sho

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -5317,6 +5329,17 @@ void ASTWriter::WriteSpecialDeclRecords(Sema &SemaRef) { } if (!DeleteExprsToAnalyze.empty()) Stream.EmitRecord(DELETE_EXPRS_TO_ANALYZE, DeleteExprsToAnalyze); + + RecordData VTablesToEmit; + for (CXXRecordDecl *RD : PendingEmittingVTables) { +

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -1529,8 +1529,14 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { if (D->isThisDeclarationADefinition()) Record.AddCXXDefinitionData(D); + if (D->isCompleteDefinition() && D->isInNamedModule()) +Writer.AddDeclRef(D, Writer.ModularCodegenDecls); +

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -18484,11 +18484,15 @@ bool Sema::DefineUsedVTables() { bool DefineVTable = true; -// If this class has a key function, but that key function is -// defined in another translation unit, we don't need to emit the -// vtable even though we're using it. c

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -1225,13 +1252,7 @@ bool CodeGenVTables::isVTableExternal(const CXXRecordDecl *RD) { const FunctionDecl *Def; // Otherwise, if we don't have a definition of the key function, the // vtable must be defined somewhere else. - if (!keyFunction->hasBody(Def)) -return

[clang] [llvm] workflows/release-binaries: Enable flang builds on Windows (PR #101344)

2024-08-07 Thread Tom Stellard via cfe-commits
https://github.com/tstellar edited https://github.com/llvm/llvm-project/pull/101344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Fix problems caused by combining BTI and GCS (PR #102322)

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

[clang] #101784 part 1: introduce ctyped in an independent manner (PR #101941)

2024-08-07 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I've been staring at `cindex.py` for the better part of yesterday and today. I'll try to describe the status quo as I understand it first, to make sure all three of us are on the same page, then I'll describe the direction I think we should take. Status quo 1. I be

[clang] [C++20] [Modules] Don't set modules owner ship information for builtin declarations (PR #102115)

2024-08-07 Thread Matheus Izvekov via cfe-commits
@@ -2376,6 +2376,12 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, FunctionDecl *New = CreateBuiltin(II, R, ID, Loc); RegisterLocallyScopedExternCDecl(New, S); + // Builtin functions shouldn't be owned by any module. + if (New->hasOwningModule(

[clang] [Modules] Fix cyclic dependencies in clang (PR #102348)

2024-08-07 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan created https://github.com/llvm/llvm-project/pull/102348 Breakup the cyclic dependency in module 'Clang_Frontend': Clang_Frontend -> Clang_Serialization -> Clang_Frontend >From dcfd3b1cc4ba4ec71f3f89c28429e6f0dac3a400 Mon Sep 17 00:00:00 2001 From: Steven Wu

[clang] [Modules] Fix cyclic dependencies in clang (PR #102348)

2024-08-07 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan unassigned https://github.com/llvm/llvm-project/pull/102348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Fix cyclic dependencies in clang (PR #102348)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Steven Wu (cachemeifyoucan) Changes Breakup the cyclic dependency in module 'Clang_Frontend': Clang_Frontend -> Clang_Serialization -> Clang_Frontend --- Full diff: https://github.com/llvm/llvm-project/pull/102348.diff 1 Files Affected:

[clang] [llvm] [RISCV] Use RVA22U64Features in the definition of sifive-p450 and sifive-p670. (PR #102350)

2024-08-07 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/102350 RVA22U64Features includes the Zicntr extension which was not present for these CPUs before. I believe that was a mistake due to weird history of the Zicntr extension. I've updated the p470 test accordingly sinc

[clang] [llvm] [RISCV] Use RVA22U64Features in the definition of sifive-p450 and sifive-p670. (PR #102350)

2024-08-07 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/102350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Fix cyclic dependencies in clang (PR #102348)

2024-08-07 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Maybe the next step is to get rid of `"clang/Frontend/PCHContainerOperations.h"` but I don't know why it was there in the first place. https://github.com/llvm/llvm-project/pull/102348 ___ cfe-commits mailing list cfe-commits@l

[clang] [llvm] [RISCV] Use RVA22U64Features in the definition of sifive-p450 and sifive-p670. (PR #102350)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Craig Topper (topperc) Changes This matches sifive-p470. RVA22U64Features includes the Zicntr extension which was not present for these CPUs before. I believe that was a mistake due to weird history of th

[clang] [llvm] [RISCV] Use RVA22U64Features in the definition of sifive-p450 and sifive-p670. (PR #102350)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Craig Topper (topperc) Changes This matches sifive-p470. RVA22U64Features includes the Zicntr extension which was not present for these CPUs before. I believe that was a mistake due to weird history of the Zicntr extension. I've

[clang] [Modules] Fix cyclic module dependencies in clang (PR #102348)

2024-08-07 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/102348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix potential null pointer dereferences in Sema::AddInitializerToDecl (PR #94368)

2024-08-07 Thread Tom Honermann via cfe-commits
tahonermann wrote: I don't think the currently proposed change is right for a few reasons. The proposed change silently marks the declaration as invalid and performs an early return. I don't think this should be a silent behavior. In most, if not all, of the existing early return cases, a diag

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
hekota wrote: > Could this be an analysis pass which collect the list as a > SmallVector instead of creating the list in 'dx.exports' metadata? You mean the DXILFinalizeLinkage pass (coming soon) that needs a list of entries and exported functions should get the information from "hlsl.shader"

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

2024-08-07 Thread Xiang Li via cfe-commits
python3kgae wrote: > > Could this be an analysis pass which collect the list as a > > SmallVector instead of creating the list in 'dx.exports' > > metadata? > > You mean the DXILFinalizeLinkage pass (coming soon) that needs a list of > entries and exported functions should get the information

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-07 Thread Vlad Serebrennikov via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] 72b73e2 - Revert "demangle function names in trace files (#87626)"

2024-08-07 Thread via cfe-commits
Author: Fangrui Song Date: 2024-08-07T12:23:28-07:00 New Revision: 72b73e23b6c36537db730ebea00f92798108a6e5 URL: https://github.com/llvm/llvm-project/commit/72b73e23b6c36537db730ebea00f92798108a6e5 DIFF: https://github.com/llvm/llvm-project/commit/72b73e23b6c36537db730ebea00f92798108a6e5.diff

[clang] [llvm] Revert "demangle function names in trace files (#87626)" (PR #102274)

2024-08-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/102274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-07 Thread via cfe-commits
yonghong-song wrote: @AaronBallman Just want to clarify about linking. For bpf ecosystem, we do not do linking with llvm lld. We do linking with bpftool (see https://www.mankier.com/8/bpftool-gen) as there are special requirements to *glue* bpf programs together. In bpf_fastcall use case, the

[clang] [llvm] [SystemZ][z/OS] __ptr32 support for z/OS (PR #101696)

2024-08-07 Thread Abhina Sree via cfe-commits
https://github.com/abhina-sree updated https://github.com/llvm/llvm-project/pull/101696 >From f6e1481fb323352a4f6ce3728424d6990f72a800 Mon Sep 17 00:00:00 2001 From: Abhina Sreeskantharajan Date: Fri, 2 Aug 2024 11:44:44 -0400 Subject: [PATCH 1/3] __ptr32 support for z/OS --- clang/include/cl

[clang] [llvm] [SystemZ][z/OS] __ptr32 support for z/OS (PR #101696)

2024-08-07 Thread Abhina Sree via cfe-commits
@@ -3650,6 +3650,14 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_ftrigraphs); } + if (T.isOSzOS()) { +if (!Opts.ZOSExt) + GenerateArg(Consumer, OPT_fno_zos_extensions); + } else { +if (Opts.ZOSExt)

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-07 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/99646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-07 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM with a test nit https://github.com/llvm/llvm-project/pull/99646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-07 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,37 @@ +; RUN: llc < %s -march=nvptx64 -mcpu=sm_32 | FileCheck %s --check-prefixes=SM30,CHECK Artem-B wrote: This test should be suitable for automatic check generation -- we probably do want to see the details of what we're doing when we do 32-bit CA

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 ready_for_review https://github.com/llvm/llvm-project/pull/101738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-07 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. That was a lot!. Didn't see anything to call out, so it looks good to me. https://github.com/llvm/llvm-project/pull/101083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] Revert "demangle function names in trace files (#87626)" (PR #102274)

2024-08-07 Thread Anton Korobeynikov via cfe-commits
asl wrote: @tru @nikic @MaskRay should this be backported to 19 release branch? https://github.com/llvm/llvm-project/pull/102274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-08-07 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr updated https://github.com/llvm/llvm-project/pull/99300 >From 51e74869c87de8ed8b37e7a9391428f3dfc1ac1a Mon Sep 17 00:00:00 2001 From: Sharadh Rajaraman Date: Sun, 14 Jul 2024 11:05:57 +0100 Subject: [PATCH 1/3] `TY_ModuleFile` should be a 'CXX' file type --- clang/

[clang] [clang][driver][clang-cl] Fix unused argument warning for `/std:c++20` for precompiled module inputs to `clang-cl` (PR #99300)

2024-08-07 Thread Sharadh Rajaraman via cfe-commits
https://github.com/sharadhr updated https://github.com/llvm/llvm-project/pull/99300 >From 51e74869c87de8ed8b37e7a9391428f3dfc1ac1a Mon Sep 17 00:00:00 2001 From: Sharadh Rajaraman Date: Sun, 14 Jul 2024 11:05:57 +0100 Subject: [PATCH 1/3] `TY_ModuleFile` should be a 'CXX' file type --- clang/

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-08-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: #100452 only fixed the "ignoring the in-class initializer of the static data member" issue. I don't think we did anything to allow downgrading overflow errors to warnings. https://github.com/llvm/llvm-project/pull/70307 ___ cfe-

[clang] [llvm] [SystemZ][z/OS] __ptr32 support for z/OS (PR #101696)

2024-08-07 Thread Zibi Sarbinowski via cfe-commits
https://github.com/zibi2 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/101696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-07 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/101240 >From c7a476a4d8b06e399e9c076cc15208871e1b5a25 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 30 Jul 2024 16:34:40 -0400 Subject: [PATCH 1/5] [HLSL] AST support for WaveSize attribute. First step for su

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-07 Thread Xiang Li via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-library -x hlsl -ast-dump -o - %s | FileCheck %s + +// CHECK-LABLE:FunctionDecl 0x{{[0-9a-f]+}} <{{.*}}> w0 'void ()' +// CHECK:HLSLWaveSizeAttr 0x{{[0-9a-f]+}} <{{.*}}> 128 0 0 + [numthreads(8,8,1)] + [WaveSize(

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-07 Thread Xiang Li via cfe-commits
@@ -2862,6 +2862,10 @@ static bool mergeDeclAttribute(Sema &S, NamedDecl *D, else if (const auto *NT = dyn_cast(Attr)) NewAttr = S.HLSL().mergeNumThreadsAttr(D, *NT, NT->getX(), NT->getY(), NT->getZ()); + else if (const auto *NT

[clang] [clang][docs] Update Include Options Help (PR #101192)

2024-08-07 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm approved this pull request. https://github.com/llvm/llvm-project/pull/101192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Update Include Options Help (PR #101192)

2024-08-07 Thread Sam Elliott via cfe-commits
https://github.com/lenary closed https://github.com/llvm/llvm-project/pull/101192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 07ddf19 - [clang][docs] Update Include Options Help (#101192)

2024-08-07 Thread via cfe-commits
Author: Sam Elliott Date: 2024-08-07T21:01:24+01:00 New Revision: 07ddf19438d20f0b9c5131288d278a5c786e662d URL: https://github.com/llvm/llvm-project/commit/07ddf19438d20f0b9c5131288d278a5c786e662d DIFF: https://github.com/llvm/llvm-project/commit/07ddf19438d20f0b9c5131288d278a5c786e662d.diff L

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-07 Thread Xiang Li via cfe-commits
@@ -144,6 +145,25 @@ HLSLNumThreadsAttr *SemaHLSL::mergeNumThreadsAttr(Decl *D, HLSLNumThreadsAttr(getASTContext(), AL, X, Y, Z); } +HLSLWaveSizeAttr *SemaHLSL::mergeWaveSizeAttr(Decl *D, + const AttributeCommonInfo &AL, +

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-07 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/101240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0f1361b - [Driver] Fix a warning

2024-08-07 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-08-07T13:10:31-07:00 New Revision: 0f1361baf650641a59aaa1710d7a0b7b02f2e56d URL: https://github.com/llvm/llvm-project/commit/0f1361baf650641a59aaa1710d7a0b7b02f2e56d DIFF: https://github.com/llvm/llvm-project/commit/0f1361baf650641a59aaa1710d7a0b7b02f2e56d.diff L

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: The current implementation strictly follows the standard's specification for replacing the return type of an alias deduction guide. However, this approach adds some implicit declarations in the AST (in terms of the partial class template specialization), wh

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
@@ -944,12 +950,63 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +// Build the type for a deduction guide generated from an inherited constructor +// [over.match.class.deduct]p1.10: +// ... the

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
@@ -936,19 +940,21 @@ Expr *buildIsDeducibleConstraint(Sema &SemaRef, Context.DeclarationNames.getCXXDeductionGuideName(AliasTemplate)); }; + TemplateDecl *TD = DeducingTemplate ? DeducingTemplate : AliasTemplate; + SmallVector IsDeducibleTypeTraitArgs = {

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
@@ -1388,6 +1695,33 @@ void Sema::DeclareImplicitDeductionGuides(TemplateDecl *Template, if (!AddedAny) Transform.buildSimpleDeductionGuide(std::nullopt); + // FIXME: Handle explicit deduction guides from inherited constructors + // when the base deduction guides are

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
@@ -944,12 +950,63 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +// Build the type for a deduction guide generated from an inherited constructor +// [over.match.class.deduct]p1.10: +// ... the

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
@@ -944,12 +950,63 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +// Build the type for a deduction guide generated from an inherited constructor +// [over.match.class.deduct]p1.10: +// ... the

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias( ->getDeductionCandidateKind() == DeductionCandidate::Aggregate) continue; -BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc); +BuildDeductionGuideForTypeAlias(Sema

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
@@ -944,12 +950,63 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +// Build the type for a deduction guide generated from an inherited constructor +// [over.match.class.deduct]p1.10: +// ... the

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

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

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread Haojian Wu via cfe-commits
@@ -1388,6 +1695,33 @@ void Sema::DeclareImplicitDeductionGuides(TemplateDecl *Template, if (!AddedAny) Transform.buildSimpleDeductionGuide(std::nullopt); + // FIXME: Handle explicit deduction guides from inherited constructors hokein wrote: I think i

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-07 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 01/12] [PowerPC] Fix codegen for transparent_union function params Up

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-07 Thread via cfe-commits
@@ -0,0 +1,37 @@ +; RUN: llc < %s -march=nvptx64 -mcpu=sm_32 | FileCheck %s --check-prefixes=SM30,CHECK gonzalobg wrote: Do we document how to do that somewhere? I didn't knew that we have automatic check generation! https://github.com/llvm/llvm-project/pull/9

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

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

[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)

2024-08-07 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @MaskRay @jyknight @jcranmer-intel Any more comments on this? https://github.com/llvm/llvm-project/pull/100453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
hekota wrote: > I mean DXILFinalizeLinkage pass could use an analysis pass to get the list of > export functions. The collecting of the list happens in the analysis pass. No > need to create a named metadata and remove it later. Sounds good. It will probably be easier for the DXILFinalizeLinka

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-07 Thread Jannick Kremer via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #102364)

2024-08-07 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/102364 The warning has been active for a few releases now, first only in user code, later in system headers, and finally as an error by default. Therefore, we believe it is now time to transition into a hard err

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #102364)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Carlos Galvez (carlosgalvezp) Changes The warning has been active for a few releases now, first only in user code, later in system headers, and finally as an error by default. Therefore, we believe it is now time to transition into a hard

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-08-07 Thread via cfe-commits
@@ -936,19 +940,21 @@ Expr *buildIsDeducibleConstraint(Sema &SemaRef, Context.DeclarationNames.getCXXDeductionGuideName(AliasTemplate)); }; + TemplateDecl *TD = DeducingTemplate ? DeducingTemplate : AliasTemplate; + SmallVector IsDeducibleTypeTraitArgs = {

[clang] [llvm] [HLSL] Add list of exported functions as named metadata node `dx.exports` (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/102275 >From 340834e9c1ea12c8de4ee9f5a6b7c0191e96f489 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 6 Aug 2024 23:19:20 -0700 Subject: [PATCH 1/4] [HLSL] Add list of exported functions as named metadata node '

[clang] [llvm] [HLSL] Mark exported functions with "hlsl.export" attribute (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/102275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Mark exported functions with "hlsl.export" attribute (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/102275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > We keep track of propagated and inferred nullability annotations in a [side > data > structure](https://github.com/google/crubit/blob/main/nullability/type_nullability.h#L185). > Our approach allows us to save on memory by not actually re-instantiating > everything with new

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-08-07 Thread Mike Hommey via cfe-commits
glandium wrote: > > > We (Chrome) no longer need a revert - we patched the NDK locally. > > > > > > Patching the NDK is not a solution that is nice everywhere, though. And the > > new warning is an error that can't be disabled. > > FWIW, we addressed this issue and backported the fix in #1004

[clang] [Bounds Safety][NFC] Add some missing coverage for `-fexperimental-late-parse-attributes` (PR #102236)

2024-08-07 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/102236 >From 885d40de074514cf349423e7ae387ccdf6dfbbc4 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Tue, 6 Aug 2024 14:38:16 -0700 Subject: [PATCH 1/2] [Bounds Safety][NFC] Add some missing coverage for `-fexperimen

[clang] [llvm] [HLSL] Mark exported functions with "hlsl.export" attribute (PR #102275)

2024-08-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/102275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Bounds Safety][NFC] Add some missing coverage for `-fexperimental-late-parse-attributes` (PR #102236)

2024-08-07 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/102236 >From b5ce9c1f8de1deb90b9473ab26cd25c5111f7b42 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Tue, 6 Aug 2024 14:38:16 -0700 Subject: [PATCH 1/2] [Bounds Safety][NFC] Add some missing coverage for `-fexperimen

[clang] [Bounds Safety][NFC] Add some missing coverage for `-fexperimental-late-parse-attributes` (PR #102236)

2024-08-07 Thread Dan Liew via cfe-commits
delcypher wrote: @AaronBallman Thanks for the feedback. I've tried to make your suggested changes. https://github.com/llvm/llvm-project/pull/102236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] Reapply "[CMake] Fold export_executable_symbols_* into function args. (#101741)" (PR #102138)

2024-08-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang-tools-extra,clang,flang,lld,llvm,mlir` at step 3 "clean-build-dir". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/620 Here is

[clang] [sanitizer] Document AddressSanitizer security considerations (PR #100937)

2024-08-07 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/100937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][PassBuilder] Extend the function signature of callback for optimizer pipeline extension point (PR #100953)

2024-08-07 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: Split it, and maybe add the Phase to the rest as well. One commit to just make it consistent and pass the information along. Second for the AMDGPU stuff. > @jdoerfert Possibly the issue you saw is that this callback just isn't used > by the post-link full LTO pipeline at all?

[clang] [llvm] [NVPTX] Support __usAtomicCAS builtin (PR #99646)

2024-08-07 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,37 @@ +; RUN: llc < %s -march=nvptx64 -mcpu=sm_32 | FileCheck %s --check-prefixes=SM30,CHECK Artem-B wrote: https://llvm.org/docs/TestingGuide.html#generating-assertions-in-regression-tests https://github.com/llvm/llvm-project/pull/99646 __

[clang] [Fuchsia][CMake] Enable new libc header gen (PR #102371)

2024-08-07 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/102371 All issues blocking this were resolved. >From 6dbb8be2352d0cdad44d293f7cc5c13f55ec243d Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 7 Aug 2024 07:40:09 + Subject: [PATCH] [Fuchsia][CMake] Enable n

[clang] [Fuchsia][CMake] Enable new libc header gen (PR #102371)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes All issues blocking this were resolved. --- Full diff: https://github.com/llvm/llvm-project/pull/102371.diff 1 Files Affected: - (modified) clang/cmake/caches/Fuchsia-stage2.cmake (-2) ``diff di

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

2024-08-07 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/96240 >From 659107442e6202b2c4e30ea1a9a5292f99c696e3 Mon Sep 17 00:00:00 2001 From: Vladislav Aranov Date: Fri, 24 May 2024 11:39:35 -0400 Subject: [PATCH] [ubsan] Display correct runtime messages for negative _BitInt

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

2024-08-07 Thread via cfe-commits
https://github.com/earnol updated https://github.com/llvm/llvm-project/pull/96240 >From 98d3d539c84c917ba7369f688ba26ff172c9d89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C3=A4nolituri=20L=C3=B3mitaur=C3=AB?= Date: Wed, 7 Aug 2024 17:29:35 -0400 Subject: [PATCH] [ubsan] Display correct runtim

[clang] [llvm] [HLSL] Mark exported functions with "hlsl.export" attribute (PR #102275)

2024-08-07 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/102275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add flag to suppress overflow errors in C++ constant expressions. (PR #102390)

2024-08-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/102390 Recent Android NDK headers are broken on 32-bit because they contain an invalid shift, and older versions of clang didn't catch this. Demote the error to a default-error with a flag so it can be suppresse

[clang] Add flag to suppress overflow errors in C++ constant expressions. (PR #102390)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes Recent Android NDK headers are broken on 32-bit because they contain an invalid shift, and older versions of clang didn't catch this. Demote the error to a default-error with a flag so it can be suppre

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-08-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: #102390 "fixes" the Android NDK issue. https://github.com/llvm/llvm-project/pull/70307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Remove EXPORT_SYMBOLS_FOR_PLUGINS from #102138 (PR #102396)

2024-08-07 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan created https://github.com/llvm/llvm-project/pull/102396 Partially remove some of the changes from #102138 as EXPORT_SYMBOLS_FOR_PLUGINS doesn't work on all the configurations. >From 6eae32d099a2ae90428831dcf1fae8efa7a8070c Mon Sep 17 00:00:00 2001 From: Stev

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Remove EXPORT_SYMBOLS_FOR_PLUGINS from #102138 (PR #102396)

2024-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-tidy Author: Steven Wu (cachemeifyoucan) Changes Partially remove some of the changes from #102138 as EXPORT_SYMBOLS_FOR_PLUGINS doesn't work on all the configurations. --- Full diff: https://gi

[clang] [clang-tools-extra] [flang] [lld] [llvm] [mlir] [CMake] Remove EXPORT_SYMBOLS_FOR_PLUGINS from #102138 (PR #102396)

2024-08-07 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: Try to fix https://github.com/llvm/llvm-project/pull/102138 after failing on `clang-ppc64-aix` bot: [https://lab.llvm.org/buildbot/#/builders/64/builds/62](https://lab.llvm.org/buildbot/#/builders/64/builds/620) https://github.com/llvm/llvm-project/pull/102396 __

<    1   2   3   4   5   6   >