[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Paul Osmialowski via cfe-commits
@@ -297,6 +297,9 @@ class Driver { /// Object that stores strings read from configuration file. llvm::StringSaver Saver; + /// Linker inputs originated from configuration file. + std::unique_ptr CfgLinkerInputs; pawosm-arm wrote: changed https://github

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > It's worth spending more time discussing the metacharacter. > > `^` can be interpreted as `^` in regex, which means the beginning. `$`, on > the other side, suggests the end. While I agree that `@` for response files > is not a good choice, I personally would not rule out `

[clang-tools-extra] [NFC] Complete proper copying and resource cleanup in classes. (PR #118655)

2024-12-05 Thread Aaron Ballman via cfe-commits
@@ -81,6 +81,9 @@ class ClangTidyContext { ~ClangTidyContext(); + ClangTidyContext(const ClangTidyContext &) = default; + ClangTidyContext &operator=(const ClangTidyContext &) = default; AaronBallman wrote: I think these would make more sense as `= delet

[clang-tools-extra] [NFC] Complete proper copying and resource cleanup in classes. (PR #118655)

2024-12-05 Thread Aaron Ballman via cfe-commits
@@ -31,6 +31,8 @@ class NoLintDirectiveHandler { public: NoLintDirectiveHandler(); ~NoLintDirectiveHandler(); + NoLintDirectiveHandler(const NoLintDirectiveHandler &) = default; + NoLintDirectiveHandler &operator=(const NoLintDirectiveHandler &) = default; ---

[clang] [analyzer][Z3] Restore the original timeout of 15s (PR #118291)

2024-12-05 Thread Balazs Benics via cfe-commits
steakhal wrote: I took the time to update the branch with my recommendations. Please confirm if you agree with the current status. tldr; I only made sure the tests actually test what they intended now that the default threshold has changed. I also added a couple more tests where it made sense,

[clang] [analyzer][Z3] Restore the original timeout of 15s (PR #118291)

2024-12-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/118291 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-12-05 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/117165 >From e90ab99dde0945d103959fa73ea2d31852f753e7 Mon Sep 17 00:00:00 2001 From: Viktor Date: Thu, 21 Nov 2024 14:33:24 + Subject: [PATCH 1/2] [clang-tidy] Add C++ member function support to user-defined bug

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-12-05 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/117165 >From e90ab99dde0945d103959fa73ea2d31852f753e7 Mon Sep 17 00:00:00 2001 From: Viktor Date: Thu, 21 Nov 2024 14:33:24 + Subject: [PATCH 1/2] [clang-tidy] Add C++ member function support to user-defined bug

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/117573 >From 7c7649d9e18bdf18671531065e48bb6ec49e0eaf Mon Sep 17 00:00:00 2001 From: Pawel Osmialowski Date: Mon, 25 Nov 2024 14:46:55 + Subject: [PATCH] [clang][driver] Special care for linker flags in config f

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Complete proper copying and resource cleanup in classes. (PR #118655)

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

[clang] [analyzer][Z3] Restore the original timeout of 15s (PR #118291)

2024-12-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/118291 >From 1fb92742a066444d4a074655704c8148ce1f8326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Mon, 2 Dec 2024 11:21:05 +0100 Subject: [PATCH 1/5] [analyzer][Z3] Restore the original timeo

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-12-05 Thread via cfe-commits
@@ -42,3 +47,19 @@ void f1() { // CHECK-MESSAGES-NON-STRICT-REGEX: :[[@LINE-1]]:3: warning: function 'prefix_match_regex' is matched on qualname prefix; it should not be used // no-warning STRICT-REGEX } + +void f2() { + S s; + Discookie wrote: Added. h

[clang] [AArch64][SME] Fix bug on SMELd1St1 (PR #118109)

2024-12-05 Thread Momchil Velikov via cfe-commits
momchil-velikov wrote: > Hi, @momchil-velikov, Hi, @CarolineConcatto, it will be great if you help to > review this patch as soon as possible! Thank you! Patch is accepted, you don't need more approvals, go ahead and commit. https://github.com/llvm/llvm-project/pull/118109

[clang] [C++20] Destroying delete and deleted destructors (PR #118800)

2024-12-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/118800 When a destroying delete overload is selected, the destructor is not automatically called. Therefore, the destructor can be deleted without causing the program to be ill-formed. >From 34d3d3000bc6096bbc9e

[clang] [C++20] Destroying delete and deleted destructors (PR #118800)

2024-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes When a destroying delete overload is selected, the destructor is not automatically called. Therefore, the destructor can be deleted without causing the program to be ill-formed. --- Full diff: https:/

[clang] [C++20] Destroying delete can cause a type to be noexcept when deleting (PR #118687)

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

[clang] [llvm] [InstCombine] Infer nusw + nneg -> nuw for getelementptr (PR #111144)

2024-12-05 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/44 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement intrinsics for SME FP8 FMLAL/FMLALL (PR #118549)

2024-12-05 Thread via cfe-commits
@@ -1965,21 +1987,91 @@ class sme2_mla_long_array_index_base op0, bits<2> op, Operand index_ty, let Inst{20}= !if(!eq(vg_acronym, ""), 0, 1); let Inst{19-16} = Zm; let Inst{14-13} = Rv; - let Inst{12}= 0b1; - let Inst{4-3} = op; let Constraints = "$ZAda

[clang-tools-extra] [NFC] Complete proper copying and resource cleanup in classes. (PR #118655)

2024-12-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I don't think any of these changes are strictly necessary (they're not fixing any bugs), but I do think they may be somewhat reasonable as an NFC cleanup if we're explicitly marking functions as deleted because we don't intend for the type to be used

[clang-tools-extra] [NFC] Complete proper copying and resource cleanup in classes. (PR #118655)

2024-12-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/118655 >From 3b93252fa52c4055e8c294784056697e92299b9b Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Wed, 4 Dec 2024 07:24:20 -0800 Subject: [PATCH 1/3] [NFC] Complete proper copying and resource cleanup in

[libunwind] [libunwind] Fix a typo in debug print (PR #118856)

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

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-12-05 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116331 >From dc6af046781abafcd14f36a835fd1557479ffdc0 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Fri, 25 Oct 2024 17:48:41 + Subject: [PATCH 01/13] adding comments --- clang/include/clang/Basic/Attr.td

[clang] [C++20] Destroying delete and deleted destructors (PR #118800)

2024-12-05 Thread Aaron Ballman via cfe-commits
@@ -3768,6 +3768,28 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, DeclarationName DeleteName = Context.DeclarationNames.getCXXOperatorName( ArrayForm ? OO_Array_Delete : OO_Delete); +// C++20 [expr.delete]p6: If

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-05 Thread Eli Friedman via cfe-commits
@@ -5563,6 +5563,12 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc, ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) { assert(Field->hasInClassInitializer()); + // We do not want to aggressively cutoff parsing. Try to recov

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-12-05 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116331 >From 3c792216f88e87b69b3ea7415c2fd74b7f5d7469 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Fri, 25 Oct 2024 17:48:41 + Subject: [PATCH 01/12] adding comments --- clang/include/clang/Basic/Attr.td

[clang] [CIR] Integral types; simple global variables (PR #118743)

2024-12-05 Thread David Olsen via cfe-commits
@@ -72,9 +63,15 @@ mlir::Type CIRGenTypes::convertType(QualType type) { } case Type::BitInt: { const auto *bitIntTy = cast(type); -resultType = -cir::IntType::get(cgm.getBuilder().getContext(), bitIntTy->getNumBits(), - bitIntTy->is

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. This looks fine to me - though given the broad impact (to every target in clang) maybe @AaronBallman wants to weigh in. If you wanted to front-load the things like `getRecord(ID).Attributes` -> `getAttributesString(ID)` those things coul

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. LGTM too. I do wonder if we can make tablegen generate the data directly in the desired format here (perhaps with some additional `.td` files to define exactly which files we want to include in which targets and to define the placeholder

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-05 Thread Erich Keane via cfe-commits
@@ -428,6 +428,9 @@ New Compiler Flags - The ``-Warray-compare`` warning has been added to warn about array comparison on versions older than C++20. +- The ``-Warray-compare-cxx26`` warning has been added to warn about array comparison + starting from C++26, this warn is e

[clang] [CIR] Integral types; simple global variables (PR #118743)

2024-12-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/118743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add '-Warray-compare' flag for C++ below version 20 (PR #118031)

2024-12-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Looks good, looking forward to the follow-up PR. https://github.com/llvm/llvm-project/pull/118031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-05 Thread Erich Keane via cfe-commits
@@ -10274,6 +10274,11 @@ def warn_array_comparison : Warning< "to compare array addresses, use unary '+' to decay operands to pointers">, InGroup>; +def warn_array_comparison_cxx26 : Warning< + "comparison between two arrays compare their addresses not their contents; " -

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-12-05 Thread Petr Hosek via cfe-commits
@@ -0,0 +1,113 @@ +//===--- Mustache.h -*- 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] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -291,6 +365,36 @@ BareMetal::OrderedMultilibs BareMetal::getOrderedMultilibs() const { return llvm::reverse(Default); } +ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const { + if (getTriple().isRISCV()) { topperc wrote: Could this be s

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -325,6 +429,19 @@ void BareMetal::addClangTargetOptions(const ArgList &DriverArgs, CC1Args.push_back("-nostdsysteminc"); } +void BareMetal::addLibStdCxxIncludePaths( +const llvm::opt::ArgList &DriverArgs, +llvm::opt::ArgStringList &CC1Args) const { + if (GCCInst

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -503,12 +624,22 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); - AddLinkerInputs(TC, Inputs, Args, CmdArgs, JA); + if (!D

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -503,12 +624,22 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); - AddLinkerInputs(TC, Inputs, Args, CmdArgs, JA); + if (!D

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -103,7 +112,12 @@ class LLVM_LIBRARY_VISIBILITY StaticLibTool : public Tool { class LLVM_LIBRARY_VISIBILITY Linker final : public Tool { public: - Linker(const ToolChain &TC) : Tool("baremetal::Linker", "ld.lld", TC) {} + Linker(const ToolChain &TC) + : Tool("baremet

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -103,7 +112,12 @@ class LLVM_LIBRARY_VISIBILITY StaticLibTool : public Tool { class LLVM_LIBRARY_VISIBILITY Linker final : public Tool { public: - Linker(const ToolChain &TC) : Tool("baremetal::Linker", "ld.lld", TC) {} + Linker(const ToolChain &TC) toppe

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #118907)

2024-12-05 Thread Shilei Tian via cfe-commits
shiltian wrote: I was thinking this PR looks familiar... https://github.com/llvm/llvm-project/pull/118907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Compute accurate begin location for CallExpr with explicit object parameter (PR #117841)

2024-12-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/117841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (PR #110063)

2024-12-05 Thread Yusuke MINATO via cfe-commits
yus3710-fj wrote: Thank you for the informantion, @tblah. I also confirmed that the regression doesn't happen after fbd89bcc6647ed611e579d8f9c38c97b8e6f7936. I'm a little concerned that the regression still occurs when LTO is diabled. However, I'd like to reland this patch because this isn't t

[clang] [Clang][Xtensa] Add Xtensa target. (PR #118008)

2024-12-05 Thread Alexey Gerenkov via cfe-commits
gerekon wrote: ping https://github.com/llvm/llvm-project/pull/118008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add stack clash protection (PR #117612)

2024-12-05 Thread Raphael Moreira Zinsly via cfe-commits
@@ -0,0 +1,537 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc -mtriple=riscv64 -mattr=+m -O2 < %s \ +; RUN: | FileCheck %s -check-prefix=RV64I +; RUN: llc -mtriple=riscv32 -mattr=+m -O2 < %s \ +; RUN: | FileCheck %s -check-prefix=

[clang] [CIR] Integral types; simple global variables (PR #118743)

2024-12-05 Thread Erich Keane via cfe-commits
@@ -72,9 +63,15 @@ mlir::Type CIRGenTypes::convertType(QualType type) { } case Type::BitInt: { const auto *bitIntTy = cast(type); -resultType = -cir::IntType::get(cgm.getBuilder().getContext(), bitIntTy->getNumBits(), - bitIntTy->is

[clang] [CIR] Integral types; simple global variables (PR #118743)

2024-12-05 Thread David Olsen via cfe-commits
@@ -82,6 +83,14 @@ void CIRGenModule::emitGlobalFunctionDefinition(clang::GlobalDecl gd, theModule.push_back(funcOp); } +void CIRGenModule::emitGlobalVarDefinition(const clang::VarDecl *vd, + bool isTentative) { + mlir::Type type =

[libunwind] [libunwind] Fix compilation for the x32 ABI. (PR #116608)

2024-12-05 Thread Alex Rønne Petersen via cfe-commits
alexrp wrote: ping https://github.com/llvm/llvm-project/pull/116608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-05 Thread Matt Arsenault via cfe-commits
arsenm wrote: > llvm.trunc is currently marked IntrNoMem in Intrinsics.td; you'll need to > update that if you want it to read/modify FP state. (Trying to override the > default by sticking attributes on top doesn't work properly, as far as I > know.) I think we need a dedicated fp env attrib

[clang-tools-extra] [clangd] Document the cases in which Dex::Files and IdxContents are populated (PR #118906)

2024-12-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/118906 This is a follow-up to https://github.com/llvm/llvm-project/pull/118324 to document that the `Dex` fields `Files` and `IdxContents` are intentionally only used in some cases, and describe what those case

[clang-tools-extra] [clangd] Document the cases in which Dex::Files and IdxContents are populated (PR #118906)

2024-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nathan Ridge (HighCommander4) Changes This is a follow-up to https://github.com/llvm/llvm-project/pull/118324 to document that the `Dex` fields `Files` and `IdxContents` are intentionally only used in some cases, and describe

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #118907)

2024-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Jun Wang (jwanggit86) Changes The AMDGPUAnnotateKernelFeatures pass infers the "amdgpu-calls" and "amdgpu-stack-objects" attributes, which are used to infer whether we need to initialize flat scratch. This is, however, not precise.

[clang-tools-extra] 9ccde12 - [clang] Compute accurate begin location for CallExpr with explicit object parameter (#117841)

2024-12-05 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-12-05T19:52:23-05:00 New Revision: 9ccde12f5eeb91152900082a2ae839e2a9702b31 URL: https://github.com/llvm/llvm-project/commit/9ccde12f5eeb91152900082a2ae839e2a9702b31 DIFF: https://github.com/llvm/llvm-project/commit/9ccde12f5eeb91152900082a2ae839e2a9702b31.diff

[clang] [clang-tools-extra] [clang] Compute accurate begin location for CallExpr with explicit object parameter (PR #117841)

2024-12-05 Thread Nathan Ridge via cfe-commits
@@ -1639,11 +1639,19 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *OCE = dyn_cast(this)) return OCE->getBeginLoc(); + if (const auto *Method = + dyn_cast_if_present(getCalleeDecl()); HighCommander4 wrote: > heh I think ther

[clang-tools-extra] [clangd] Document the cases in which Dex::Files and IdxContents are populated (PR #118906)

2024-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Nathan Ridge (HighCommander4) Changes This is a follow-up to https://github.com/llvm/llvm-project/pull/118324 to document that the `Dex` fields `Files` and `IdxContents` are intentionally only used in some cases, and describe what those

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #118907)

2024-12-05 Thread Jun Wang via cfe-commits
jwanggit86 wrote: [PR 94647](https://github.com/llvm/llvm-project/pull/94647) was found to cause build problems after merge with upstream. It has since been reverted by commit 1ef9410a96c1d9669a6feaf03fcab8d0a4a13bd5. This PR fixes the tests that caused the build problems. https://github.com/

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #118907)

2024-12-05 Thread Matt Arsenault via cfe-commits
arsenm wrote: Should have the git generated "Reapply..." message with reference to the original https://github.com/llvm/llvm-project/pull/118907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

2024-12-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Do you still want an issue to be opened? I sent out a follow-up PR at https://github.com/llvm/llvm-project/pull/118906 to add a comment describing the situations in which `IdxContents` is used, to avoid future confusion. https://github.com/llvm/llvm-project/pull/118324

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); + const Type *N

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

2024-12-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/83108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-05 Thread via cfe-commits
@@ -5563,6 +5563,12 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc, ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) { assert(Field->hasInClassInitializer()); + // We do not want to aggressively cutoff parsing. Try to recov

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-05 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/113049 >From 804b1032cb23cea8fa705a0d2130b1f95185c949 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 20 Nov 2024 23:45:59 +0800 Subject: [PATCH 1/7] [clang] Fix a crash issue that caused by handling of fields wit

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-05 Thread Fangrui Song via cfe-commits
@@ -490,6 +490,35 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +const llvm::Triple &Triple = TC.getTriple(); +StringRef

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

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

[clang] 74d29c6 - [clang-format] Open plurals.txt in read-only mode in dump_format_style.py

2024-12-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-12-05T19:25:32-08:00 New Revision: 74d29c6393df606e98e7c42b9a97f56f335e3ffb URL: https://github.com/llvm/llvm-project/commit/74d29c6393df606e98e7c42b9a97f56f335e3ffb DIFF: https://github.com/llvm/llvm-project/commit/74d29c6393df606e98e7c42b9a97f56f335e3ffb.diff LOG:

[clang] [llvm] [clang-format] Add cmake target clang-format-style-options for updating ClangFormatStyleOptions.rst (PR #111513)

2024-12-05 Thread Owen Pan via cfe-commits
owenca wrote: > ``` > FAILED: > /var/llvm-compile-time-tracker/llvm-project/clang/docs/ClangFormatStyleOptions.rst > > cd /var/llvm-compile-time-tracker/llvm-project/clang/docs/tools && > /usr/bin/python3.10 dump_format_style.py > Traceback (most recent call last): > File > "/var/llvm-comp

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-05 Thread Yanzuo Liu via cfe-commits
@@ -239,7 +239,7 @@ C++2c implementation status Remove Deprecated Array Comparisons from C++26 https://wg21.link/P2865R6";>P2865R6 - No + Clang 20 zwuis wrote: ```suggestion Clang 20 ``` https://github.com/llvm/llvm-project/pull/118872

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: CI is green. Requesting review. https://github.com/llvm/llvm-project/pull/118236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review https://github.com/llvm/llvm-project/pull/118236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9a5946c - [clang-format] Add --directory option to dump_format_help.py

2024-12-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-12-05T20:16:09-08:00 New Revision: 9a5946cdba91ce9801643711186dbffddda9f111 URL: https://github.com/llvm/llvm-project/commit/9a5946cdba91ce9801643711186dbffddda9f111 DIFF: https://github.com/llvm/llvm-project/commit/9a5946cdba91ce9801643711186dbffddda9f111.diff LOG:

[clang] [CIR] Integral types; simple global variables (PR #118743)

2024-12-05 Thread Erich Keane via cfe-commits
@@ -72,9 +63,15 @@ mlir::Type CIRGenTypes::convertType(QualType type) { } case Type::BitInt: { const auto *bitIntTy = cast(type); -resultType = -cir::IntType::get(cgm.getBuilder().getContext(), bitIntTy->getNumBits(), - bitIntTy->is

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/118872 Starting from C++26 the array comparison warning should converted to an error. Fixes: #117859 >From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 5 Dec 20

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Starting from C++26 the array comparison warning should converted to an error. Fixes: #117859 --- Full diff: https://github.com/llvm/llvm-project/pull/118872.diff 7 Files Affected: - (modified) clang/d

[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

2024-12-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > relanded with benchmark fix in > [61fe67a](https://github.com/llvm/llvm-project/commit/61fe67a4017375fd675f75652e857e837f77fa51) > > changed required -> optional in > [c7ef0ac](https://github.com/llvm/llvm-project/commit/c7ef0ac9fd28cb55b8c7c91a890b365cc688f9a9) Thanks

[clang] [CIR] Integral types; simple global variables (PR #118743)

2024-12-05 Thread David Olsen via cfe-commits
@@ -0,0 +1,132 @@ +//===- CIRTypes.td - CIR dialect types -*- tablegen -*-===// +// +// 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] [CIR] Integral types; simple global variables (PR #118743)

2024-12-05 Thread David Olsen via cfe-commits
@@ -0,0 +1,90 @@ +#include "CIRGenTypes.h" + +#include "CIRGenModule.h" + +#include "clang/AST/ASTContext.h" +#include "clang/AST/Type.h" + +using namespace clang; +using namespace clang::CIRGen; + +CIRGenTypes::CIRGenTypes(CIRGenModule &genModule) +: cgm(genModule), context(g

[clang] [CIR] Integral types; simple global variables (PR #118743)

2024-12-05 Thread David Olsen via cfe-commits
@@ -0,0 +1,130 @@ +//===- CIRTypes.td - CIR dialect types -*- tablegen -*-===// +// +// 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

[libclc] [libclc] Move several integer functions to CLC library (PR #116786)

2024-12-05 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,21 @@ +#ifndef __CLC_INTEGER_CLC_CLZ_H__ +#define __CLC_INTEGER_CLC_CLZ_H__ + +#if defined(CLC_CLSPV) || defined(CLC_SPIRV) +// clspv and spir-v targets provide their own OpenCL-compatible clz +#define __clc_clz clz arsenm wrote: > In this context of t

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Chandler Carruth via cfe-commits
https://github.com/chandlerc updated https://github.com/llvm/llvm-project/pull/118734 >From 16e70ef753de962e76b5232912094a51ca24 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 28 Nov 2024 09:56:40 + Subject: [PATCH] Switch builtin strings to use string tables MIME-Version: 1

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 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 983f88c1ec9cee51cf0fb4e6a0f00074a7cf1b60 16e70ef753de962e76b5232912094a51ca24 --e

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-05 Thread Alexander Kornienko via cfe-commits
alexfh wrote: The original file is huge and template heavy, so reduction will take some time. I wonder if you can spot something obviously wrong in the commit given the information above? Failing that, can we revert in the meantime? https://github.com/llvm/llvm-project/pull/118455

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Chandler Carruth via cfe-commits
chandlerc wrote: Updated to use the GCC diagnostic push the same as TableGen does for long string literals. Also added Aaron to take a look as well (unless he's comfortable already). https://github.com/llvm/llvm-project/pull/118734 ___ cfe-commits ma

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Chandler Carruth via cfe-commits
https://github.com/chandlerc updated https://github.com/llvm/llvm-project/pull/118734 >From 73a0b5c796881d1e52f8336eb69f678fd4c9f4c4 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 28 Nov 2024 09:56:40 + Subject: [PATCH] Switch builtin strings to use string tables MIME-Version: 1

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-05 Thread Mike Hommey via cfe-commits
glandium wrote: We're getting a similar crash bisected to this change as well, also with a huge original file. Funnily enough, a debug build hits an assertion that happens even without this change, so I'm going to dig into that before even trying to reduce the crasher. https://github.com/llvm

<    1   2   3   4