[clang] [RISCV] Handle empty structs/unions passing in C++ (PR #97315)

2024-07-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > What about the case I have mentioned in https://godbolt.org/z/vdhGbvj6W ? That test doesn't really prove anything useful. The zeroing of a0 doesn't have any ABI significance: "struct s12" doesn't have any data in it, so the caller can't use the value in a0 for anything.

[clang] [clang] Use internal linkage for c23 constexpr vars. (PR #97846)

2024-07-08 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. LGTM, though please let others to take a look too. https://github.com/llvm/llvm-project/pull/97846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

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

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jianjian Guan (jacquesguan) Changes They are already ratified now. --- Patch is 307.38 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/97996.diff 307 Files Affected: - (modified) clang/lib/Se

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

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 aa9e4f0bc93fc735e83ea8b5269e699f31fb9d28 26ec7e54f0cfa6bae524c6a6994758f74ecd9c85 --

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

2024-07-08 Thread Pengcheng Wang via cfe-commits
@@ -271,7 +271,7 @@ The primary goal of experimental support is to assist in the process of ratifica ``experimental-zalasr`` LLVM implements the `0.0.5 draft specification `__. -``experimental-zfbfmin``, ``experimental-zvfbfmin``

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Thanks! Btw is the check intended to be used in C code as well? (I do not see C tests for it). If not, then i can move the logic to the matcher to keep it a bit cleaner, and restrict the check to C++ code. The warning text mentions anonymous namespaces which would not be

[clang] [llvm] [SanitizerBinaryMetadata] Fix multi-version sanitizer metadata (PR #97848)

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

[clang] [NFC][clang] Add a release note for `#embed` (PR #97997)

2024-07-08 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/97997 None >From 65fbdb7bfc69640b4c9e43ced21eeeb6d3f44c5f Mon Sep 17 00:00:00 2001 From: Mariya Podchishchaeva Date: Mon, 8 Jul 2024 09:32:12 +0200 Subject: [PATCH] [NFC][clang] Add a release note for `#embed` ---

[clang] [NFC][clang] Add a release note for `#embed` (PR #97997)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/97997.diff 1 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+3) ``diff diff --git a/clang/docs/ReleaseNotes.rst b/

[clang] [clang] Inject tokens containing #embed back into token stream (PR #97274)

2024-07-08 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/97274 >From 4d5008fcf3ac37fa213c8f2cf42c3cce6369c83d Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 20 Jun 2024 06:04:07 -0700 Subject: [PATCH] [clang] Inject tokens containing #embed back into to

[clang] [clang] Inject tokens containing #embed back into token stream (PR #97274)

2024-07-08 Thread Mariya Podchishchaeva via cfe-commits
@@ -43,8 +43,9 @@ a }; // CHECK: store i32 107, ptr %b, align 4 -int b = +int b = ( #embed +) Fznamznon wrote: In fact, they fix several bugs. https://github.com/llvm/llvm-project/pull/97274 ___ cfe-commits ma

[clang] [clang] Inject tokens containing #embed back into token stream (PR #97274)

2024-07-08 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: It's been a week. Are we good to go? @cor3ntin https://github.com/llvm/llvm-project/pull/97274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Inject tokens containing #embed back into token stream (PR #97274)

2024-07-08 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/97274 >From 4d5008fcf3ac37fa213c8f2cf42c3cce6369c83d Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 20 Jun 2024 06:04:07 -0700 Subject: [PATCH 1/2] [clang] Inject tokens containing #embed back int

[clang] [llvm] [AIX] Add -msave-reg-params to save arguments to stack (PR #97524)

2024-07-08 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/97524 >From 654cf7753023302c367340872e889856f8738169 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Wed, 3 Jul 2024 14:17:01 +0800 Subject: [PATCH 1/2] [AIX] Add -msave-reg-params to save arguments to stack In Pow

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-08 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly updated https://github.com/llvm/llvm-project/pull/97767 >From 1cf4340d7302e075a8785f23fd383db29cedd590 Mon Sep 17 00:00:00 2001 From: %username% <%userna...@google.com> Date: Thu, 4 Jul 2024 22:32:19 +0200 Subject: [PATCH 1/5] Allow unnecessary-value-param to match

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-08 Thread Vitaly Goldshteyn via cfe-commits
@@ -0,0 +1,93 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Sebastian Kreutzer via cfe-commits
@@ -1520,10 +1520,14 @@ bool tools::addSanitizerRuntimes(const ToolChain &TC, const ArgList &Args, } bool tools::addXRayRuntime(const ToolChain&TC, const ArgList &Args, ArgStringList &CmdArgs) { - if (Args.hasArg(options::OPT_shared)) -return false; - - if (TC.getXRayA

[clang] [RISCV] Handle empty structs/unions passing in C++ (PR #97315)

2024-07-08 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic updated https://github.com/llvm/llvm-project/pull/97315 >From 3c744fe6111f0b6d24356a584f94c6d1cb273f7a Mon Sep 17 00:00:00 2001 From: Sudharsan Veeravalli Date: Mon, 1 Jul 2024 21:58:37 +0530 Subject: [PATCH 1/4] [RISCV] Handle empty structs/unions passing in C++ --

[clang] [RISCV] Handle empty structs/unions passing in C++ (PR #97315)

2024-07-08 Thread Sudharsan Veeravalli via cfe-commits
svs-quic wrote: Thanks. I have modified the check and added a relevant test for empty arrays. https://github.com/llvm/llvm-project/pull/97315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Sebastian Kreutzer via cfe-commits
@@ -346,8 +392,8 @@ else() # not Apple DEFS ${XRAY_COMMON_DEFINITIONS} OBJECT_LIBS RTXrayBASIC PARENT_TARGET xray) - # Profiler Mode runtime - add_compiler_rt_runtime(clang_rt.xray-profiling +# Profiler Mode runtime +add_compiler_rt_runtime(clang_r

[clang] [compiler-rt] [safestack] Various Solaris fixes (PR #98001)

2024-07-08 Thread Rainer Orth via cfe-commits
https://github.com/rorth created https://github.com/llvm/llvm-project/pull/98001 At the end of the recent flurry of Illumos (and implicitly Solaris) safestack patches, the tests were disabled in b0260c5b1052f8e3ff1ec77dc42a11f42da762cc without explanation. After re-enabling them, there were man

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Sebastian Kreutzer via cfe-commits
@@ -0,0 +1,62 @@ +//===-- xray_init.cpp ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [compiler-rt] [safestack] Various Solaris fixes (PR #98001)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-compiler-rt-sanitizer Author: Rainer Orth (rorth) Changes At the end of the recent flurry of Illumos (and implicitly Solaris) safestack patches, the tests were disabled in b0260c5b1052f8e3ff1ec77dc42a11f42da762cc without explanation. After re-enabling

[clang] [compiler-rt] [safestack] Various Solaris fixes (PR #98001)

2024-07-08 Thread Rainer Orth via cfe-commits
rorth wrote: The mentioned patch to switch safestack to use the `sanitizer_common` functions instead of their own ones in `sanitizer_platform.h` has to wait until this one is approved: AFAIT github doesn't support stacked pull requests. https://github.com/llvm/llvm-project/pull/98001 _

[clang] [compiler-rt] [safestack] Various Solaris fixes (PR #98001)

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 d6af73e9fbc84315100499a096f17ec5ea23 f8de9c3c2dbde4021f0d32a55c8a385221c0f749 --

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Sebastian Kreutzer via cfe-commits
@@ -50,14 +52,72 @@ atomic_uint8_t XRayInitialized{0}; // This should always be updated before XRayInitialized is updated. SpinMutex XRayInstrMapMutex; -XRaySledMap XRayInstrMap; +// XRaySledMap XRayInstrMap; +// Contains maps for the main executable as well as DSOs. +// std:

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Sebastian Kreutzer via cfe-commits
@@ -111,6 +156,71 @@ void __xray_init() XRAY_NEVER_INSTRUMENT { #endif } +// Default visibility is hidden, so we have to explicitly make it visible to +// DSO. +SANITIZER_INTERFACE_ATTRIBUTE int32_t __xray_register_dso( +const XRaySledEntry *SledsBegin, const XRaySledEntry

[clang] [compiler-rt] [safestack] Various Solaris fixes (PR #98001)

2024-07-08 Thread Rainer Orth via cfe-commits
rorth wrote: > ⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️ > You can test this locally with the following command: > View the diff from clang-format here. > > ```diff > diff --git a/compiler-rt/lib/safestack/safestack_platform.h > b/compiler-rt/lib/safestack/safestack_pl

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

2024-07-08 Thread Jianjian Guan via cfe-commits
@@ -271,7 +271,7 @@ The primary goal of experimental support is to assist in the process of ratifica ``experimental-zalasr`` LLVM implements the `0.0.5 draft specification `__. -``experimental-zfbfmin``, ``experimental-zvfbfmin``

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-08 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly updated https://github.com/llvm/llvm-project/pull/97767 >From 1cf4340d7302e075a8785f23fd383db29cedd590 Mon Sep 17 00:00:00 2001 From: %username% <%userna...@google.com> Date: Thu, 4 Jul 2024 22:32:19 +0200 Subject: [PATCH 1/6] Allow unnecessary-value-param to match

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-07-08 Thread Younan Zhang via cfe-commits
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) { return Params; } +class TypeInlayHintLabelPartBuilder +: public TypeVisitor { + QualType CurrentType; + NestedNameSpecifier *CurrentNestedNameSpecifier; + ASTContext &Context; + StringRef M

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-07-08 Thread Younan Zhang via cfe-commits
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) { return Params; } +class TypeInlayHintLabelPartBuilder +: public TypeVisitor { + QualType CurrentType; + NestedNameSpecifier *CurrentNestedNameSpecifier; + ASTContext &Context; + StringRef M

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-07-08 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,124 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-07-08 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,124 @@ +//===--- ProBoundsAvoidUncheckedContainerAccesses.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Sebastian Kreutzer via cfe-commits
@@ -471,42 +518,123 @@ uint16_t __xray_register_event_type( } XRayPatchingStatus __xray_patch() XRAY_NEVER_INSTRUMENT { - return controlPatching(true); + XRayPatchingStatus CombinedStatus{SUCCESS}; + for (size_t I = 0; I < __xray_num_objects(); ++I) { +if (!isObjectLoad

[clang] [llvm] [AArch64][RISCV] Improve the tests for --print-enabled-extensions and --print-supported-extensions (PR #97829)

2024-07-08 Thread Tomas Matheson via cfe-commits
tmatheson-arm wrote: > Mind sticking it in a gist at least so folks can use it for downstream > subtargets? [Here you go](https://gist.github.com/tmatheson-arm/333dd14cc1c95ab4ac563ed615add95d) https://github.com/llvm/llvm-project/pull/97829 ___ cfe

[clang] [compiler-rt] [safestack] Various Solaris fixes (PR #98001)

2024-07-08 Thread David CARLIER via cfe-commits
devnexen wrote: you do not need to worry I won t do any illumos/solaris work anytime soon, feel free to do xray port and all the rest. https://github.com/llvm/llvm-project/pull/98001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [NFC][clang] Add a release note for `#embed` (PR #97997)

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

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Sebastian Kreutzer via cfe-commits
@@ -471,42 +518,123 @@ uint16_t __xray_register_event_type( } XRayPatchingStatus __xray_patch() XRAY_NEVER_INSTRUMENT { - return controlPatching(true); + XRayPatchingStatus CombinedStatus{SUCCESS}; sebastiankreutzer wrote: I would argue yes, since in this c

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-07-08 Thread Younan Zhang via cfe-commits
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) { return Params; } +class TypeInlayHintLabelPartBuilder +: public TypeVisitor { + QualType CurrentType; + NestedNameSpecifier *CurrentNestedNameSpecifier; + ASTContext &Context; + StringRef M

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

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

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

2024-07-08 Thread Daniil Kovalev via cfe-commits
@@ -10685,6 +10689,26 @@ SDValue AArch64TargetLowering::LowerBR_JT(SDValue Op, return DAG.getNode(ISD::BRIND, DL, MVT::Other, JTInfo, SDValue(Dest, 0)); } +SDValue AArch64TargetLowering::LowerBRIND(SDValue Op, SelectionDAG &DAG) const { + MachineFunction &MF = DAG.getMachi

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

2024-07-08 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 commented: The changes mostly look reasonable, but there are several comments to be answered before the PR can be merged. Regarding previous @efriedma-quic 's comment about computing the difference between two blockaddresses - I suppose it might be OK just to explic

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

2024-07-08 Thread Daniil Kovalev via cfe-commits
@@ -412,6 +412,15 @@ class AArch64Subtarget final : public AArch64GenSubtargetInfo { /// Choose a method of checking LR before performing a tail call. AArch64PAuth::AuthCheckMethod getAuthenticatedLRCheckMethod() const; + /// Compute the integer discriminator for a given

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

2024-07-08 Thread Daniil Kovalev via cfe-commits
@@ -10704,15 +10728,36 @@ SDValue AArch64TargetLowering::LowerConstantPool(SDValue Op, SDValue AArch64TargetLowering::LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const { - BlockAddressSDNode *BA = cast(Op); + BlockAddressS

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

2024-07-08 Thread Daniil Kovalev via cfe-commits
@@ -1866,6 +1876,20 @@ void AArch64AsmPrinter::LowerMOVaddrPAC(const MachineInstr &MI) { assert(STI->getInstrInfo()->getInstSizeInBytes(MI) >= InstsEmitted * 4); } +const MCExpr * +AArch64AsmPrinter::lowerBlockAddressConstant(const BlockAddress &BA) { + const MCExpr *BAE =

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

2024-07-08 Thread Daniil Kovalev via cfe-commits
@@ -2516,6 +2516,10 @@ bool AArch64FastISel::selectIndirectBr(const Instruction *I) { if (AddrReg == 0) return false; + // Authenticated indirectbr is not implemented yet. kovdan01 wrote: It looks like that a test with FastISel ensuring that we fall b

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

2024-07-08 Thread Daniil Kovalev via cfe-commits
@@ -3461,6 +3470,23 @@ bool AArch64InstructionSelector::select(MachineInstr &I) { return true; } case TargetOpcode::G_BLOCK_ADDR: { +Function *BAFn = I.getOperand(1).getBlockAddress()->getFunction(); +if (std::optional BADisc = +STI.getPtrAuthBlockA

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

2024-07-08 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,106 @@ +; RUN: llc -mtriple arm64e-apple-darwin \ +; RUN: -asm-verbose=false -aarch64-enable-collect-loh=false \ +; RUN: -o - %s | FileCheck %s + +; RUN: llc -mtriple arm64e-apple-darwin \ +; RUN: -global-isel -global-isel-abort=1 -verify-machineinstrs \ +; RUN:

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

2024-07-08 Thread Daniil Kovalev via cfe-commits
@@ -1789,6 +1789,9 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args, options::OPT_fno_ptrauth_vtable_pointer_type_discrimination); Args.addOptInFlag(CmdArgs, options::OPT_fptrauth_init_fini, options::OPT_fno_ptrauth_init_fini); + -

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Sebastian Kreutzer via cfe-commits
@@ -63,6 +63,10 @@ XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) { << XRayInstrument->getSpelling() << Triple.str(); } + if (Args.hasFlag(options::OPT_fxray_enable_shared, + options::OPT_fno_xray_enable_shared, false)) +XRayEnab

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-07-08 Thread Younan Zhang via cfe-commits
@@ -1005,14 +1332,22 @@ class InlayHintVisitor : public RecursiveASTVisitor { // The sugared type is more useful in some cases, and the canonical // type in other cases. auto Desugared = maybeDesugar(AST, T); -std::string TypeName = Desugared.getAsString(TypeHi

[clang] [Clang] Make -fcomplete-member-pointers the same as using the Microsoft C++ ABI (PR #98010)

2024-07-08 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/98010 This essentially adds a new language mode `CompleteMemberPointers`. With the Microsoft C++ ABI, this will always be true. Otherwise, it can be enabled with `-fcomplete-member-pointers`, and will work the same

[clang] [Clang] Make -fcomplete-member-pointers the same as using the Microsoft C++ ABI (PR #98010)

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 f50f7a7aa0b897ef91361d7dc159f3262d142bdc 0de7bd39af61eb47ee33ff991e6de18f83e005dd --

[clang] [Clang] Make -fcomplete-member-pointers the same as using the Microsoft C++ ABI (PR #98010)

2024-07-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: TODO: - Tests for `-Wincomplete-member-pointer` - Possibly do something else about `-fsanitize=cfi-mfcall`. `-Wincomplete-member-pointer` is too broad, for the sanitizer we only care about a call to a pointer to member function. The warning could also be emitted here: htt

[clang] [Clang] Make -fcomplete-member-pointers the same as using the Microsoft C++ ABI (PR #98010)

2024-07-08 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/98010 >From 7cc8f4c8c4e39db82ff8f7cb7164a94abf6b2029 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 8 Jul 2024 10:36:35 +0100 Subject: [PATCH] [Clang] Make -fcomplete-member-pointers the same as using the Mi

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-08 Thread Mital Ashok via cfe-commits
MitalAshok wrote: > Will that include fixing clang incorrectly warning when an inheritance model > is explicitly specified? Yes, I have a WIP of it here #98010 where that doesn't get a warning (https://github.com/llvm/llvm-project/pull/98010/files#diff-bec1ae40e5793adbd61e7a9dc41a4715a06e27888

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/98013 As described in https://github.com/llvm/llvm-project/issues/90209#issuecomment-2135972202, Clang may not preserve enough information during template argument deduction. This can result in a merely canonical `Tem

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes As described in https://github.com/llvm/llvm-project/issues/90209#issuecomment-2135972202, Clang may not preserve enough information during template argument deduction. This can result in a merely canonical `T

[clang] [clang] CTAD: use index and depth to retrieve template parameter for TemplateParamsReferencedInTemplateArgumentList (PR #98013)

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 f50f7a7aa0b897ef91361d7dc159f3262d142bdc 1b4a711ebe32879608026007de7fc373d44fbcf4 --

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-08 Thread Constantin Kronbichler via cfe-commits
https://github.com/ccrownhill created https://github.com/llvm/llvm-project/pull/98016 This fixes issue #39558 which mentions the problem when compiling the following code with `-pedantic-errors` flag (it also mentions `-Wall -Wextra` but those shouldn't change the output, which is also the cas

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-08 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Constantin Kronbichler (ccrownhill) Changes This fixes issue #39558 which mentions the problem when compiling the following code with `-pedantic-errors` flag (it also mentions `-Wall -Wextra` but those shouldn't change the output, which i

[clang-tools-extra] [clang-tidy] Do not warn on const variables in misc-use-internal-linkage (PR #97969)

2024-07-08 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/97969 >From a1fec907b5d3920d5dda8761b6e173e153b7f281 Mon Sep 17 00:00:00 2001 From: Carlos Galvez Date: Sun, 7 Jul 2024 21:11:54 +0200 Subject: [PATCH] [clang-tidy] Do not warn on const variables in misc-use-int

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-08 Thread Balazs Benics via cfe-commits
steakhal wrote: Ping. https://github.com/llvm/llvm-project/pull/97418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-08 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/97418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][docs] Add clang-19 release notes for CSA (PR #97418)

2024-07-08 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Small note, the screenshot has the "improvements" part, but I did not find that in the actual PR. https://github.com/llvm/llvm-project/pull/97418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

2024-07-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/96686 >From c835f5acbcb9c768c525df835d09fbe301edd197 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 25 Jun 2024 10:16:54 +0200 Subject: [PATCH 1/2] [clang] CTAD: Fix deduction guides for alias are not generated f

[clang] [LinkerWrapper] Pass all files to the device linker (PR #97573)

2024-07-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/97573 >From 7a64ee668b33c912f83d4f848ab72d421f8a1bec Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 24 Jun 2024 15:14:52 -0500 Subject: [PATCH 1/2] [Clang] Introduce 'clang-nvlink-wrappaer' to work around 'nvl

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

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 8ac6b415e4e5e631410d9cf6a10f15668f663441 240a56717440df2f857b5aa2fc556ffc3ce4adca --

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Sebastian Kreutzer via cfe-commits
@@ -0,0 +1,62 @@ +//===-- xray_init.cpp ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

2024-07-08 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/96686 >From c835f5acbcb9c768c525df835d09fbe301edd197 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 25 Jun 2024 10:16:54 +0200 Subject: [PATCH 1/2] [clang] CTAD: Fix deduction guides for alias are not generated f

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

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

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

2024-07-08 Thread Hirofumi Nakamura via cfe-commits
@@ -26827,6 +26827,31 @@ TEST_F(FormatTest, BreakAdjacentStringLiterals) { Style.BreakAdjacentStringLiterals = false; verifyFormat(Code, Style); } + +TEST_F(FormatTest, BreakAfterGNUAttributes) { + FormatStyle Style = getLLVMStyle(); + Style.BreakAfterAttributes = FormatS

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

2024-07-08 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 commented: There are small suggestions on the format of test. https://github.com/llvm/llvm-project/pull/78102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

2024-07-08 Thread Hirofumi Nakamura via cfe-commits
@@ -26827,6 +26827,31 @@ TEST_F(FormatTest, BreakAdjacentStringLiterals) { Style.BreakAdjacentStringLiterals = false; verifyFormat(Code, Style); } + +TEST_F(FormatTest, BreakAfterGNUAttributes) { + FormatStyle Style = getLLVMStyle(); + Style.BreakAfterAttributes = FormatS

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

2024-07-08 Thread Hirofumi Nakamura via cfe-commits
@@ -26827,6 +26827,31 @@ TEST_F(FormatTest, BreakAdjacentStringLiterals) { Style.BreakAdjacentStringLiterals = false; verifyFormat(Code, Style); } + +TEST_F(FormatTest, BreakAfterGNUAttributes) { + FormatStyle Style = getLLVMStyle(); + Style.BreakAfterAttributes = FormatS

[clang] [clang] Add -Wimplicit-fallthrough to -Wextra (PR #97926)

2024-07-08 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman please review > > I don't know how to go about measuring if there even is a performance > regression. How would I do that? I would put up a branch on http://llvm-compile-time-tracker.com (instructions in the `About` page) and see how this impacts compile ti

[clang] [hexagon] Add {con, de}structive interference size defn (PR #94877)

2024-07-08 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you! https://github.com/llvm/llvm-project/pull/94877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Add INFINITY and NAN macros to (PR #96659)

2024-07-08 Thread via cfe-commits
bgra8 wrote: @AaronBallman [N2848](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2848.pdf) explicitly mentions that `NAN` and `INFINITY` macros should expand to a constant expression of type `float` not `double` like was implemented in this patch. `__builtin_nanf` and `__builtin_inff` sh

[clang] [llvm] [AArch64][RISCV] Improve the tests for --print-enabled-extensions and --print-supported-extensions (PR #97829)

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

[clang] [llvm] [AArch64][RISCV] Improve the tests for --print-enabled-extensions and --print-supported-extensions (PR #97829)

2024-07-08 Thread Tomas Matheson via cfe-commits
@@ -0,0 +1,24 @@ +// REQUIRES: aarch64-registered-target tmatheson-arm wrote: I've kept them as-is so that they still correspond to the [generating script](https://gist.github.com/tmatheson-arm/333dd14cc1c95ab4ac563ed615add95d). https://github.com/llvm/llvm-pro

[clang] [C23] Add INFINITY and NAN macros to (PR #96659)

2024-07-08 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman > [N2848](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2848.pdf) > explicitly mentions that `NAN` and `INFINITY` macros should expand to a > constant expression of type `float` not `double` like was implemented in this > patch. > > `__builtin_nanf` an

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Brian Cain via cfe-commits
@@ -346,8 +392,8 @@ else() # not Apple DEFS ${XRAY_COMMON_DEFINITIONS} OBJECT_LIBS RTXrayBASIC PARENT_TARGET xray) - # Profiler Mode runtime - add_compiler_rt_runtime(clang_rt.xray-profiling +# Profiler Mode runtime +add_compiler_rt_runtime(clang_r

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Sebastian Kreutzer via cfe-commits
@@ -0,0 +1,62 @@ +//===-- xray_init.cpp ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-07-08 Thread Brian Cain via cfe-commits
@@ -471,42 +518,123 @@ uint16_t __xray_register_event_type( } XRayPatchingStatus __xray_patch() XRAY_NEVER_INSTRUMENT { - return controlPatching(true); + XRayPatchingStatus CombinedStatus{SUCCESS}; androm3da wrote: > We could add an assertion to make this a

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

2024-07-08 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: Ping! 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] [llvm] [AArch64][RISCV] Improve the tests for --print-enabled-extensions and --print-supported-extensions (PR #97829)

2024-07-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/1159 Here is the relevant piece of

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-07-08 Thread Michael Kruse via cfe-commits
Meinersbur wrote: Using git bisect, I tracked down Flang not working anymore on Windows to this PR: ``` > flang-new hello.f90 -o hello flang-new version 19.0.0git Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Users\meinersbur\build\llvm-project\release\bin Build config: +a

[clang] 2f2b931 - [C23] Correct the type for INFINITY and NAN in freestanding

2024-07-08 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-07-08T09:10:25-04:00 New Revision: 2f2b931e1296aebe6c03fd969363683b637973e5 URL: https://github.com/llvm/llvm-project/commit/2f2b931e1296aebe6c03fd969363683b637973e5 DIFF: https://github.com/llvm/llvm-project/commit/2f2b931e1296aebe6c03fd969363683b637973e5.diff

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-07-08 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/95904 ___ 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 Aaron Ballman via cfe-commits
AaronBallman wrote: > Ping! CC @rjmccall and @efriedma-quic -- we're still hoping to get this resolved for Clang 19 and the branch date is Tue Jul 23, so it's coming up quickly. https://github.com/llvm/llvm-project/pull/91364 ___ cfe-commits mailing

[clang] [C23] Add INFINITY and NAN macros to (PR #96659)

2024-07-08 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > @AaronBallman > > [N2848](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2848.pdf) > > explicitly mentions that `NAN` and `INFINITY` macros should expand to a > > constant expression of type `float` not `double` like was implemented in > > this patch. > > `__builtin

[clang] ba1d21c - [C2y] Claim conformance to WG14 N3254 (#97581)

2024-07-08 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-07-08T09:13:24-04:00 New Revision: ba1d21c7d8613c90e424fa3e77d52184d531c302 URL: https://github.com/llvm/llvm-project/commit/ba1d21c7d8613c90e424fa3e77d52184d531c302 DIFF: https://github.com/llvm/llvm-project/commit/ba1d21c7d8613c90e424fa3e77d52184d531c302.diff

[clang] [C2y] Claim conformance to WG14 N3254 (PR #97581)

2024-07-08 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/97581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Inject tokens containing #embed back into token stream (PR #97274)

2024-07-08 Thread via cfe-commits
@@ -1018,6 +1018,7 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind, // primary-expression case tok::numeric_constant: cor3ntin wrote: Can you adapt the couple other places where we parse a numeric constant? https://github.com/llvm/ll

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

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

[clang] [X86][vectorcall] Do not consume register for indirect return value (PR #97939)

2024-07-08 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > I meant, at the beginning of X86_32ABIInfo::computeInfo there's a chain of if > statements that set up the properties of different calling conventions, and > maybe some bits could be set there. If you don't think that makes sense, > though, it's fine. Thanks @efriedma-quic

[clang] [C23] Add INFINITY and NAN macros to (PR #96659)

2024-07-08 Thread via cfe-commits
bgra8 wrote: > > > @AaronBallman > > > [N2848](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2848.pdf) > > > explicitly mentions that `NAN` and `INFINITY` macros should expand to a > > > constant expression of type `float` not `double` like was implemented in > > > this patch. > > > `__bu

[clang] [X86][vectorcall] Do not consume register for indirect return value (PR #97939)

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

  1   2   3   4   5   >