[clang] [llvm] Add __hlt intrinsic for Windows ARM. (PR #96578)

2024-07-08 Thread Amy Huang via cfe-commits
https://github.com/amykhuang closed https://github.com/llvm/llvm-project/pull/96578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Report error in clang if wave32 is requested where unsupported (PR #97633)

2024-07-08 Thread Stanislav Mekhanoshin via cfe-commits
@@ -188,8 +188,12 @@ bool AMDGPUTargetInfo::initFeatureMap( // TODO: Should move this logic into TargetParser std::string ErrorMsg; - if (!insertWaveSizeFeature(CPU, getTriple(), Features, ErrorMsg)) { -Diags.Report(diag::err_invalid_feature_combination) << ErrorMsg;

[clang] [CodeGen] Add a flag to disable emitting block signature strings (PR #96944)

2024-07-08 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. https://github.com/llvm/llvm-project/pull/96944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix crash in Sema::FindInstantiatedDecl (PR #96509)

2024-07-08 Thread Matheus Izvekov via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -6300,7 +6300,7 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, getTrivialTemplateArgumentLoc(UnpackedArg, QualType(), Loc)); } QualType T = CheckT

[clang] [llvm] [CUDA] Add support for CUDA-12.6 and sm_100 (PR #97402)

2024-07-08 Thread Artem Belevich via cfe-commits
Artem-B wrote: > This PR is redundant, closing. I think the patch was perfectly fine. Considering that other NVIDIA open-source projects already mention sm_100 (E.g. https://github.com/NVIDIA/cccl/blob/5efe53dbd71ea3e4bc4fdbb73edc001e0bf81547/libcudacxx/include/nv/detail/__target_macros#L241),

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

2024-07-08 Thread Michael Kruse via cfe-commits
Meinersbur wrote: @dpalermo I added fix as PR #98072 https://github.com/llvm/llvm-project/pull/93519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

2024-07-08 Thread Amara Emerson via cfe-commits
https://github.com/aemerson created https://github.com/llvm/llvm-project/pull/98073 This re-introduces the effective behaviour that was reverted in 7ad481e76c9bee5b9895ebfa0fdb52f31cb7de77. This time we're not using the same mechanism, exposing another reservation feature that prevents only r

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amara Emerson (aemerson) Changes This re-introduces the effective behaviour that was reverted in 7ad481e76c9bee5b9895ebfa0fdb52f31cb7de77. This time we're not using the same mechanism, exposing another reservation feature that prevents o

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Amara Emerson (aemerson) Changes This re-introduces the effective behaviour that was reverted in 7ad481e76c9bee5b9895ebfa0fdb52f31cb7de77. This time we're not using the same mechanism, exposing another reservation feature that pre

[clang] [llvm] Revert "[AArch64] Add support for -ffixed-x30" (PR #88019)

2024-07-08 Thread Amara Emerson via cfe-commits
aemerson wrote: Candidate PR: https://github.com/llvm/llvm-project/pull/98073 https://github.com/llvm/llvm-project/pull/88019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/6] if debug exists, go up an extra dir --- clang-tools-extra/

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-08 Thread via cfe-commits
cor3ntin wrote: @AaronBallman could you give a look at this? https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Add assertion to ensure FiniteMathOnly is in sync with HonorINFs and HonorNANs. (PR #97342)

2024-07-08 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 727ecaf7d16d44ecf434284c60ad65b22d814092 3a6cc060a0b91e2d960ea92a1d307a0bae3893f4 --

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-08 Thread Anton Korobeynikov via cfe-commits
asl wrote: > Please make sure you have a testcase for computing the difference between two > blockaddresses (`void g(int*); int f() { static int x = &&A-&&B; > A:g(&x);B:return x; }`). Not sure how you should handle that case. Will you please clarify what is the problem here? `&&A-&&B` will be

[clang] [Clang] prevent checking destructor reference with an invalid initializer (PR #97860)

2024-07-08 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/97860 >From cb3c677c9eb10998ed7357cdde2722f3b3c1c847 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 6 Jul 2024 00:24:06 +0300 Subject: [PATCH] [Clang] prevent checking destructor reference with an invalid in

[clang] [Clang] fix cast failures by adjusting the resolution of record declaration contexts to handle semantic and lexical distinctions (PR #96228)

2024-07-08 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/96228 >From 9e2730da07df0ee5102912490a687ba40bf06def Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 24 Jun 2024 18:55:51 +0300 Subject: [PATCH] [Clang] fix cast failures by adjusting the resolution of record

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -44,7 +42,10 @@ foreach(f ${assets}) install(FILES ${asset_dir}/${f} DESTINATION "${CMAKE_INSTALL_DATADIR}/clang-doc" COMPONENT clang-doc) - copy_files_to_dst(${asset_dir} ${resource_dir} ${f}) + foreach(config ${CMAKE_CONFIGURATION_TYPES}) damy

[clang-tools-extra] [clang-tidy] Ignore requires expr in bugprone-assignment-in-if-condition (PR #98079)

2024-07-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/98079 Ignore assignments in RequiresExpr, to avoid false positives. Fixes #97972 >From 90e7fb770a09ec2327d255596b79168f055d6e14 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Mon, 8 Jul 2024 21:14:25 + Subject

[clang-tools-extra] [clang-tidy] Ignore requires expr in bugprone-assignment-in-if-condition (PR #98079)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Ignore assignments in RequiresExpr, to avoid false positives. Fixes #97972 --- Full diff: https://github.com/llvm/llvm-project/pull/98079.diff 3 Files Affected:

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-07-08 Thread Chris Apple via cfe-commits
@@ -0,0 +1,516 @@ +//===--- rtsan_test_interceptors.cpp - Realtime Sanitizer ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [AMDGPU] Report error in clang if wave32 is requested where unsupported (PR #97633)

2024-07-08 Thread Shilei Tian via cfe-commits
@@ -188,8 +188,12 @@ bool AMDGPUTargetInfo::initFeatureMap( // TODO: Should move this logic into TargetParser std::string ErrorMsg; - if (!insertWaveSizeFeature(CPU, getTriple(), Features, ErrorMsg)) { -Diags.Report(diag::err_invalid_feature_combination) << ErrorMsg;

[clang] [llvm] [APFloat] Add support for f8E4M3 IEEE 754 type (PR #97179)

2024-07-08 Thread Alexander Pivovarov via cfe-commits
apivovarov wrote: Thorsten, Matt, looks like this PR was lost. Can you look at this PR one more time? @tschuett @arsenm https://github.com/llvm/llvm-project/pull/97179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [flang] [flang] Add -fhermetic-module-files (PR #98083)

2024-07-08 Thread Peter Klausler via cfe-commits
https://github.com/klausler created https://github.com/llvm/llvm-project/pull/98083 Module files emitted by this Fortran compiler are valid Fortran source files. Symbols that are USE-associated into modules are represented in their module files with USE statements and special comments with ha

[clang] [flang] [flang] Add -fhermetic-module-files (PR #98083)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Peter Klausler (klausler) Changes Module files emitted by this Fortran compiler are valid Fortran source files. Symbols that are USE-associated into modules are represented in their module files with USE statements and special com

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

2024-07-08 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/86858 >From 31af119d614ef2108b5404f9c9387ec45aa1bfef Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 21 Mar 2024 15:07:31 -0700 Subject: [PATCH 01/10] [Clang][objectsize] Generate object size calculation for

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

2024-07-08 Thread Francis Visoiu Mistrih via cfe-commits
@@ -0,0 +1,4 @@ + francisvm wrote: ```suggestion ``` https://github.com/llvm/llvm-project/pull/98073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

2024-07-08 Thread Amara Emerson via cfe-commits
https://github.com/aemerson updated https://github.com/llvm/llvm-project/pull/98073 >From d7a8f55b0790b15060f73f188ce97c83fe75f62d Mon Sep 17 00:00:00 2001 From: Amara Emerson Date: Mon, 8 Jul 2024 10:09:06 -0700 Subject: [PATCH 1/2] [AArch64] Add -mlr-for-calls-only to replace the now removed

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

2024-07-08 Thread Francis Visoiu Mistrih via cfe-commits
https://github.com/francisvm approved this pull request. Things LGTM, and thanks for fixing the liveness issue. Please let @efriedma-quic comment on the flag name as well. https://github.com/llvm/llvm-project/pull/98073 ___ cfe-commits mailing list cf

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -44,7 +42,10 @@ foreach(f ${assets}) install(FILES ${asset_dir}/${f} DESTINATION "${CMAKE_INSTALL_DATADIR}/clang-doc" COMPONENT clang-doc) - copy_files_to_dst(${asset_dir} ${resource_dir} ${f}) + foreach(config ${CMAKE_CONFIGURATION_TYPES}) bob8

[clang] [Clang][AArch64] Add missing SME/SVE2.1 feature macros (PR #98058)

2024-07-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/98058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add missing SME/SVE2.1 feature macros (PR #98058)

2024-07-08 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff f15266e9d5d87a291a515064f8f0dd5f0c412ed3 db70c76188aaa6c525d6ca3a65de8d8aa408e40b --

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-07-08 Thread Akira Hatanaka via cfe-commits
@@ -5,55 +5,65 @@ // RUN: -fptrauth-vtable-pointer-address-discrimination \ // RUN: -fptrauth-vtable-pointer-type-discrimination \ // RUN: -fptrauth-init-fini | \ -// RUN: FileCheck %s --check-prefixes=INTRIN,CALLS,RETS,VPTR_ADDR_DISCR,VPTR_TYPE_DISCR,INITFINI +// RUN:

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-07-08 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/96992 >From cf22a4be007f7e6fdc6e4c17c1f32fa70440b123 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 26 Jun 2024 13:02:31 -0700 Subject: [PATCH 1/4] [clang] Implement function pointer type discrimination Giv

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-08 Thread John McCall via cfe-commits
@@ -128,6 +128,16 @@ class CodeGenTypes { /// memory representation is usually i8 or i32, depending on the target. llvm::Type *ConvertTypeForMem(QualType T, bool ForBitField = false); + /// Check that size and ABI alignment of given LLVM type matches size and + /// align

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-08 Thread John McCall via cfe-commits
@@ -128,6 +128,16 @@ class CodeGenTypes { /// memory representation is usually i8 or i32, depending on the target. llvm::Type *ConvertTypeForMem(QualType T, bool ForBitField = false); + /// Check that size and ABI alignment of given LLVM type matches size and + /// align

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-08 Thread John McCall via cfe-commits
@@ -610,8 +610,26 @@ bool ConstStructBuilder::AppendBytes(CharUnits FieldOffsetInChars, } bool ConstStructBuilder::AppendBitField( -const FieldDecl *Field, uint64_t FieldOffset, llvm::ConstantInt *CI, +const FieldDecl *Field, uint64_t FieldOffset, llvm::Constant *C,

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

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

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-08 Thread John McCall via cfe-commits
@@ -118,6 +124,39 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T, bool ForBitField) { return R; } +bool CodeGenTypes::typeRequiresSplitIntoByteArray(QualType ASTTy, + llvm::Type *LLVMTy) { + if (!LLVMTy) +LLVM

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-08 Thread John McCall via cfe-commits
https://github.com/rjmccall requested changes to this pull request. Getting very close. https://github.com/llvm/llvm-project/pull/91364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-08 Thread John McCall via cfe-commits
@@ -1774,6 +1784,22 @@ llvm::Constant *ConstantEmitter::emitForMemory(CodeGenModule &CGM, return Res; } + if (destType->isBitIntType()) { +if (!CGM.getTypes().LLVMTypeLayoutMatchesAST(destType, C->getType())) { + // Long _BitInt has array of bytes as in-memory

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/7] if debug exists, go up an extra dir --- clang-tools-extra/

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98088)

2024-07-08 Thread via cfe-commits
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/98088 Namespace macro that should be used to declare a new namespace is updated from LIBC_NAMESPACE to LIBC_NAMESPACE_DECL which by default has hidden visibility (#97109). This commit updates the clang-tidy checks to ma

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Under the proposed ABI, `&&A-&&B` is actually "sign(A)-sign(B)". Which is a constant, but not one which can be represented as a relocation (as far as I know). https://github.com/llvm/llvm-project/pull/97647 ___ cfe-commits maili

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-08 Thread Anton Korobeynikov via cfe-commits
asl wrote: > Under the proposed ABI, `&&A-&&B` is actually "sign(A)-sign(B)". Which is a > constant, but not one which can be represented as a relocation (as far as I > know). Right. The difference should be not be signed IMO as stated above. https://github.com/llvm/llvm-project/pull/97647 __

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98088)

2024-07-08 Thread Roland McGrath via cfe-commits
@@ -11,6 +11,8 @@ namespace clang::tidy::llvm_libc { const static llvm::StringRef RequiredNamespaceStart = "__llvm_libc"; +const static llvm::StringRef RequiredNamespaceHiddenMacroName = frobtech wrote: I think it would be better to call this one "...Namespac

[clang] [CodeGen] Add a flag to disable emitting block signature strings (PR #96944)

2024-07-08 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/96944 >From d21bdaec94a169b27e7f7bace399e77bf99fd572 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 25 Jun 2024 19:37:46 -0700 Subject: [PATCH 1/2] [CodeGen] Add a flag to disable emitting block signature s

[clang] [Clang] Allow diagnostics starting with Arm (PR #98091)

2024-07-08 Thread via cfe-commits
https://github.com/amilendra created https://github.com/llvm/llvm-project/pull/98091 We (Arm) have a few downstream-only diagnostics that start with Arm, so wish to add Arm to the list of allowed start words. >From f7b07c66341f7ea0fec83d1f72d20b4bdf0bf585 Mon Sep 17 00:00:00 2001 From: Amilend

[clang] [Clang] Allow diagnostics starting with Arm (PR #98091)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (amilendra) Changes We (Arm) have a few downstream-only diagnostics that start with Arm, so wish to add Arm to the list of allowed start words. --- Full diff: https://github.com/llvm/llvm-project/pull/98091.diff 1 Files Affected:

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer" +struct Eg1 { + float f; + // Buffer Buf; damyanp wrote: This file has a bunch of members and binding annotations

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; damyanp wrote: >From [what I can >tell](https://llvm.org/docs/CodingStandards.html#n

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp requested changes to this pull request. I've not finished reviewing all of it, but here's a first batch of observations. https://github.com/llvm/llvm-project/pull/97103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

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

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -29,6 +29,25 @@ using namespace clang; SemaHLSL::SemaHLSL(Sema &S) : SemaBase(S) {} +HLSLResourceAttr *SemaHLSL::mergeHLSLResourceAttr(bool CBuffer) { damyanp wrote: This function confuses me a bit. The "merge" part seems to suggest that it is going to

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -38,6 +57,10 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool CBuffer, HLSLBufferDecl *Result = HLSLBufferDecl::Create( getASTContext(), LexicalParent, CBuffer, KwLoc, Ident, IdentLoc, LBrace); + HLSLResourceAttr *NewAttr = mergeHLSLResourceAttr(CBuffe

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer" +struct Eg1 { + float f; + // Buffer Buf; + RWBuffer RWBuf; + }; +Eg1 e1 : /* register(t0) :*/ register(u0); +// Valid: f is skip

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

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

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/97505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -25,17 +25,15 @@ set(assets ) set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets") -set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc") set(out_files) function(copy_files_to_dst src_dir dst_dir file) set(src "${src_dir}/${file}") set(dst "${dst_dir}/${file}"

[clang] [lldb] [llvm] [BOLT][DWARF][NFC] Refactor address writers (PR #98094)

2024-07-08 Thread Sayhaan Siddiqui via cfe-commits
https://github.com/sayhaan created https://github.com/llvm/llvm-project/pull/98094 Refactors address writers to create an instance for each CU and its DWO CU. >From b2fe35ae825dc757ea1daaf49142e789c4a560fc Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Tue, 1 Jun 2021 11:37:41 -0700 Subject:

[clang] [HLSL] Add test for export function redeclaration (PR #97370)

2024-07-08 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/97370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Set default DwarfVersion to 4 for HLSL. (PR #97854)

2024-07-08 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/97854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/97505 >From 1c190c9c6b55aec23bab6d7b2a0f489c59285dc7 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 2 Jul 2024 18:38:24 -0700 Subject: [PATCH 1/8] if debug exists, go up an extra dir --- clang-tools-extra/

[clang-tools-extra] Fix Default Asset File locator for clang docs (PR #97505)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -25,17 +25,15 @@ set(assets ) set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets") -set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc") set(out_files) function(copy_files_to_dst src_dir dst_dir file) set(src "${src_dir}/${file}") set(dst "${dst_dir}/${file}"

[clang] [llvm] [AArch64][PAC] Sign block addresses used in indirectbr. (PR #97647)

2024-07-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The issue is just that clang expects the following to compile. And with the current version of the patch, I think we end up crashing in the backend. ``` @f.x = internal global i32 trunc (i64 sub (i64 ptrtoint (ptr blockaddress(@f, %A) to i64), i64 ptrtoint (ptr blockaddre

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-07-08 Thread Eli Friedman via cfe-commits
@@ -3140,6 +3140,269 @@ ASTContext::getPointerAuthVTablePointerDiscriminator(const CXXRecordDecl *RD) { return llvm::getPointerAuthStableSipHash(Str); } +/// Encode a function type for use in the discriminator of a function pointer +/// type. We can't use the itanium scheme

[clang] [clang] Implement function pointer type discrimination (PR #96992)

2024-07-08 Thread Eli Friedman via cfe-commits
@@ -2220,6 +2220,11 @@ llvm::Constant *ConstantLValueEmitter::emitPointerAuthPointer(const Expr *E) { // The assertions here are all checked by Sema. assert(Result.Val.isLValue()); + auto *Base = Result.Val.getLValueBase().get(); + if (auto *Decl = dyn_cast_or_null(Base

[clang] [llvm] [AsmPrinter] Don't check for inlineasm dialect on non-X86 platforms (PR #98097)

2024-07-08 Thread David Tellenbach via cfe-commits
https://github.com/dtellenbach created https://github.com/llvm/llvm-project/pull/98097 AArch64 uses MCAsmInfo::AssemblerDialect to control the style of emitted Neon assembly. E.g. Apple platforms use AsmWriterVariantTy::Apple by default which collides with InlineAsm::AD_Intel (both value 1). C

[clang] [llvm] [AsmPrinter] Don't check for inlineasm dialect on non-X86 platforms (PR #98097)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Tellenbach (dtellenbach) Changes AArch64 uses MCAsmInfo::AssemblerDialect to control the style of emitted Neon assembly. E.g. Apple platforms use AsmWriterVariantTy::Apple by default which collides with InlineAsm::AD_Intel (both val

[clang] [llvm] [AsmPrinter] Don't check for inlineasm dialect on non-X86 platforms (PR #98097)

2024-07-08 Thread David Tellenbach via cfe-commits
dtellenbach wrote: @MaskRay the added test fails since your commit https://github.com/llvm/llvm-project/commit/f4335f075b3496bce6b49f9267e6160d1824b1bb. The commit itself is alright, just exposed the underlying problem. https://github.com/llvm/llvm-project/pull/98097 __

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

2024-07-08 Thread Kefu Chai via cfe-commits
tchaikov wrote: thank you Piotr for merging this change. https://github.com/llvm/llvm-project/pull/93623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow diagnostics starting with Arm (PR #98091)

2024-07-08 Thread Jon Roelofs via cfe-commits
jroelofs wrote: If the diagnostics are downstream-only, does this really need go upstream? https://github.com/llvm/llvm-project/pull/98091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [llvm] [llvm][misexpect] Update MisExpect to use provenance tracking metadata (PR #86610)

2024-07-08 Thread Paul Kirth via cfe-commits
ilovepi wrote: ping https://github.com/llvm/llvm-project/pull/86610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-08 Thread Reid Kleckner via cfe-commits
rnk wrote: I think this NTTP mangling code needs some significant updates, refactoring, and an increase in test coverage. I see cd93532dfc455255cb2fa553090d14aaa52b106b landed last May, probably when I was offline for a while. https://github.com/llvm/llvm-project/pull/97792 __

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

2024-07-08 Thread Eli Friedman via cfe-commits
@@ -3267,10 +3267,13 @@ bool AArch64FrameLowering::spillCalleeSavedRegisters( InsertSEH(MIB, TII, MachineInstr::FrameSetup); } else { // The code when the pair of ZReg is not present MachineInstrBuilder MIB = BuildMI(MBB, MI, DL, TII.get(StrOpc)); - if (!

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

2024-07-08 Thread Eli Friedman via cfe-commits
@@ -4917,6 +4917,9 @@ foreach i = {1-31} in def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group, HelpText<"Reserve the x"#i#" register (AArch64/RISC-V only)">; +def mlr_for_calls_only : Flag<["-"], "mlr-for-calls-only">, Group, efriedma-quic wrote: Name

[clang-tools-extra] 46a2abb - [clang-doc][nfc] Avoid constructing SmallString in ToString method (#96921)

2024-07-08 Thread via cfe-commits
Author: Paul Kirth Date: 2024-07-08T16:30:18-07:00 New Revision: 46a2abb91cb6cfac9b807ae2055cc5f1743405e4 URL: https://github.com/llvm/llvm-project/commit/46a2abb91cb6cfac9b807ae2055cc5f1743405e4 DIFF: https://github.com/llvm/llvm-project/commit/46a2abb91cb6cfac9b807ae2055cc5f1743405e4.diff LO

[clang-tools-extra] [clang-doc][nfc] Avoid constructing SmallString in ToString method (PR #96921)

2024-07-08 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/96921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,206 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang-tools-extra] [clang-doc] fix paths by hard coding path to share (PR #98099)

2024-07-08 Thread via cfe-commits
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/98099 Fixes https://github.com/llvm/llvm-project/issues/97507 The previous patch I put up broke clang's standalone build, this patch is a hack workaround so that the clang-docs tests can pass regression test withou

[clang-tools-extra] [clang-doc] fix paths by hard coding path to share (PR #98099)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) Changes Fixes https://github.com/llvm/llvm-project/issues/97507 The previous patch I put up broke clang's standalone build, this patch is a hack workaround so that the clang-docs tests can pass regression tes

[clang] [llvm] [AsmPrinter] Don't check for inlineasm dialect on non-X86 platforms (PR #98097)

2024-07-08 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,23 @@ +// REQUIRES: aarch64-registered-target jroelofs wrote: Is this a new folder? There should be a `lit.local.cfg` in there that takes care of this: ``` if "AArch64" not in config.root.targets: config.unsupported = True ``` If not, please add

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] [llvm] [X86] Support branch hint (PR #97721)

2024-07-08 Thread via cfe-commits
@@ -1815,12 +1822,12 @@ def : ProcModel<"pantherlake", AlderlakePModel, def : ProcModel<"clearwaterforest", AlderlakePModel, ProcessorFeatures.CWFFeatures, ProcessorFeatures.ADLTuning>; def : ProcModel<"graniterapids", SapphireRapidsModel, -Proce

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang-tools-extra] [clang-doc] fix paths by hard coding path to share (PR #98099)

2024-07-08 Thread Paul Kirth via cfe-commits
ilovepi wrote: I'd rephrase your commit message and title in the following way. ``` [clang-doc][cmake] Fix asset directory location for other generator types This patch fixes how clang-doc copies asset files for the build to match the install location for all CMake generator types. The previous

[clang-tools-extra] [clang-doc] fix paths by hard coding path to share (PR #98099)

2024-07-08 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM, modulo my comments on the commit message and title, and premerge checks passing. https://github.com/llvm/llvm-project/pull/98099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer" +struct Eg1 { + float f; + // Buffer Buf; bob80905 wrote: Yes, it is intentional. The commented-out examples canno

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer" +struct Eg1 { + float f; + // Buffer Buf; + RWBuffer RWBuf; + }; +Eg1 e1 : /* register(t0) :*/ register(u0); +// Valid: f is skip

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Joshua Batista via cfe-commits
@@ -437,7 +460,406 @@ void SemaHLSL::handleShaderAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +struct register_binding_flags { + bool resource = false; + bool udt = false; + bool other = false; + bool basic = false; + + bool srv = false; + bool uav =

[clang] [llvm] [RISCV] Remove experimental for bf16 extensions (PR #97996)

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

[clang-tools-extra] [clang-tidy] let UseAfterMoveFinder::find() return an optional (PR #98100)

2024-07-08 Thread Kefu Chai via cfe-commits
https://github.com/tchaikov created https://github.com/llvm/llvm-project/pull/98100 before this change, we use an output parameter so `UseAfterMoveFinder::find()` can return the found `UseAfterMove`, and addition to it, `UseAfterMoveFinder::find()` return a bool, so we can tell if a use-after-

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

2024-07-08 Thread Kefu Chai via cfe-commits
@@ -175,6 +218,10 @@ bool UseAfterMoveFinder::findInternal(const CFGBlock *Block, MovingCall != nullptr && Sequence->potentiallyAfter(MovingCall, Use); +// We default to false here and change this to true if required in +// find(). +

[clang-tools-extra] [clang-tidy] let UseAfterMoveFinder::find() return an optional (PR #98100)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Kefu Chai (tchaikov) Changes before this change, we use an output parameter so `UseAfterMoveFinder::find()` can return the found `UseAfterMove`, and addition to it, `UseAfterMoveFinder::find()` r

[clang] Implement resource binding type prefix mismatch flag setting logic (PR #97103)

2024-07-08 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,104 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer" +struct Eg1 { + float f; + // Buffer Buf; + RWBuffer RWBuf; + }; +Eg1 e1 : /* register(t0) :*/ register(u0); +// Valid: f is skip

[clang-tools-extra] [clang-tidy] let UseAfterMoveFinder::find() return an optional (PR #98100)

2024-07-08 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 46a2abb91cb6cfac9b807ae2055cc5f1743405e4 3537fe828bac5678970e106ac89306e465446163 --

<    1   2   3   4   5   >