[clang] [clang-repl]: Print stack-trace on crash (PR #117896)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mészáros Gergely (Maetveis) Changes Call `llvm::sys::PrintStackTraceOnErrorSignal` at the start of main to 1. Print a strack trace on crash 2. Disable the assertion failed popup in Windows Debug Builds Other tools (for example clang-check

[clang] [clang-repl]: Print stack-trace on crash (PR #117896)

2024-11-27 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis created https://github.com/llvm/llvm-project/pull/117896 Call `llvm::sys::PrintStackTraceOnErrorSignal` at the start of main to 1. Print a strack trace on crash 2. Disable the assertion failed popup in Windows Debug Builds Other tools (for example clang-check or clan

[clang] [analyzer][NFC] Cleanup BranchNodeBuilder (PR #117898)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes Previously `BranchNodeBuilder` had a machinery to mark the two possible branches (true, false) as infeasible, but this was completely useless in practice, because the `BranchNodeBuilder` objects where short-

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

2024-11-27 Thread Michał Górny via cfe-commits
https://github.com/mgorny approved this pull request. I don't see anything wrong but I don't consider myself an expert either. https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang-tools-extra] Rename CODE_OWNERS -> Maintainers (PR #114544)

2024-11-27 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/114544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-11-27 Thread Stephen Tozer via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 %s -O2 -emit-llvm -fextend-lifetimes -o - | FileCheck %s +// Make sure we don't generate fake.use for non-scalar variables. +// Make sure we don't generate fake.use for volatile variables +// and parameters even when they are scalar. + +struct

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-11-27 Thread via cfe-commits
@@ -424,72 +432,87 @@ const std::array SVEEmitter::Reinterprets = //===--===// std::string SVEType::builtin_str() const { - std::string S; - if (isVoid()) -return "v"; + std::string OutStr; if (i

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-27 Thread Yupei Liu via cfe-commits
LYP951018 wrote: I have a draft which implements the capture rule for deferred lambda instantiation https://github.com/llvm/llvm-project/pull/105953 I've been too busy lately and haven't continued working on this Pull Request.If you're interested,you can take a look at it. https://github.com/l

[clang-tools-extra] [clang-tidy] do not expand macros in modernize-use-using fix (PR #113837)

2024-11-27 Thread Congcong Cai via cfe-commits
@@ -119,14 +122,55 @@ void UseUsingCheck::check(const MatchFinder::MatchResult &Result) { return; } - PrintingPolicy PrintPolicy(getLangOpts()); - PrintPolicy.SuppressScope = true; - PrintPolicy.ConstantArraySizeAsWritten = true; - PrintPolicy.UseVoidForZeroParams =

[clang] [clang-repl]: Print stack-trace on crash (PR #117896)

2024-11-27 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: > LGTM! Do you have commit access or shall I land this change for you? Thanks that was extremely quick. I have access, but I'll wait for the CI to finish to be sure. https://github.com/llvm/llvm-project/pull/117896 ___ cfe-commits ma

[clang-tools-extra] 2f02b5a - [clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative (#117837)

2024-11-27 Thread via cfe-commits
Author: Nicolas van Kempen Date: 2024-11-27T12:03:10-05:00 New Revision: 2f02b5af6ecb973d3a7faad9b0daff22646e724d URL: https://github.com/llvm/llvm-project/commit/2f02b5af6ecb973d3a7faad9b0daff22646e724d DIFF: https://github.com/llvm/llvm-project/commit/2f02b5af6ecb973d3a7faad9b0daff22646e724d.

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative (PR #117837)

2024-11-27 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank closed https://github.com/llvm/llvm-project/pull/117837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add "extend lifetime" flags and release note (PR #110000)

2024-11-27 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/11 >From a33566974fbf260181d20d3f1b67081d21493506 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 25 Sep 2024 15:08:39 +0100 Subject: [PATCH 1/2] [Clang] Add "extend lifetime" flags and release note Follow

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Djordje Todorovic via cfe-commits
@@ -0,0 +1,158 @@ +//===--- RISCVRemoveBackToBackBranches.cpp ===// +// +// 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] [llvm] [XRay] Add `-fxray-default-options` to pass build-time defined XRay options (PR #116878)

2024-11-27 Thread Min-Yih Hsu via cfe-commits
mshockwave wrote: > Perhaps `__xray_default_options()` like `__asan_default_options()`? The user > would need to provide a `.o` that defines the function, but there is more > flexibility (e.g. the function can inspect a config file). I think this will be a better idea. It simplifies the design

[clang] [compiler-rt] [llvm] [XRay] Add `-fxray-default-options` to pass build-time defined XRay options (PR #116878)

2024-11-27 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave closed https://github.com/llvm/llvm-project/pull/116878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [XRay] Add `-fxray-default-options` to pass build-time defined XRay options (PR #116878)

2024-11-27 Thread Min-Yih Hsu via cfe-commits
mshockwave wrote: Close this PR in favor of #117921 https://github.com/llvm/llvm-project/pull/116878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Format bitfield width diagnostics with thousands-separators (PR #117763)

2024-11-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Wondering if we should have a toString() version that does this > > automatically, > > Yes, I think either a `toStringWithDigitSeparators` function, or an overload > taking an enum rather than a whole bunch of bool would improve this code a > lot. Should we come up wi

[clang] [clang] Move warning about memset/memcpy to NonTriviallyCopyable type… (PR #117387)

2024-11-27 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/117387 >From fda70bc5aeabe33fc578fbb2f55bc805a3304059 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Fri, 22 Nov 2024 22:38:23 +0100 Subject: [PATCH 1/2] [clang] Move warning about memset/memcpy to N

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/116257 >From eb6fea771b0824fef979e5eef26718ecbc8c7f56 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 14 Nov 2024 16:07:32 + Subject: [PATCH 1/6] [NFC][clang][FMV][TargetInfo] Refactor API for FMV

[clang] 198fb5e - [clang][dataflow] Add captured parameters to ReferencedDecls for lamb… (#117771)

2024-11-27 Thread via cfe-commits
Author: Samira Bazuzi Date: 2024-11-27T10:08:57-05:00 New Revision: 198fb5ed4ac7d096da03ea4a0a27832d18b1350f URL: https://github.com/llvm/llvm-project/commit/198fb5ed4ac7d096da03ea4a0a27832d18b1350f DIFF: https://github.com/llvm/llvm-project/commit/198fb5ed4ac7d096da03ea4a0a27832d18b1350f.diff

[clang] [clang] Allow delayed function instantiation at TU end if initial instantiation fails (PR #117167)

2024-11-27 Thread Erich Keane via cfe-commits
erichkeane wrote: I have the very rough start of what needs to happen here; https://reviews.llvm.org/D138148 https://github.com/llvm/llvm-project/pull/117167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang] recognize any *-ld.lld variant (PR #117338)

2024-11-27 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/117338 >From 607746891ed8683262c468be8d2848c7ad88b320 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Thu, 21 Nov 2024 19:46:04 -0800 Subject: [PATCH] [clang] recognize hexagon-*-ld.lld variants If we create a cross

[clang] [clang] recognize hexagon-*-ld.lld variants (PR #117338)

2024-11-27 Thread Brian Cain via cfe-commits
https://github.com/androm3da edited https://github.com/llvm/llvm-project/pull/117338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] recognize hexagon-*-ld.lld variants (PR #117338)

2024-11-27 Thread Brian Cain via cfe-commits
androm3da wrote: > I am still not sure about this change. > > I think this common utility is only to make `-fuse-ld=lld` recognize > LinkerIsLLD. Toolchains/Hexagon.cpp detects ld.lld and you can make the > change there? Okay - the scope is now reduced to `Toolchains/Hexagon.cpp` only. https

[clang] [clang] recognize hexagon-*-ld.lld variants (PR #117338)

2024-11-27 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/117338 >From fa2c015073b1afa282d76c2c2b462fb84feeb688 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Thu, 21 Nov 2024 19:46:04 -0800 Subject: [PATCH] [clang] recognize hexagon-*-ld.lld variants If we create a cross

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-11-27 Thread Sander de Smalen via cfe-commits
@@ -423,131 +434,143 @@ const std::array SVEEmitter::Reinterprets = // Type implementation //===--===// -std::string SVEType::builtin_str() const { - std::string S; - if (isVoid()) +std::string SVEType::bu

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-11-27 Thread Sander de Smalen via cfe-commits
@@ -431,133 +434,130 @@ const std::array SVEEmitter::Reinterprets = // Type implementation //===--===// -std::string SVEType::builtin_str() const { - std::string OutStr; - - if (isScalarPredicate()) -r

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Min-Yih Hsu via cfe-commits
@@ -0,0 +1,279 @@ +//===-- RISCVSchedMIPSP8700.td - MIPS RISC-V Processor -*- 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] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thanks for this! I think the direction is reasonable. I'm a little bit worried about the behavior of the C++ Core Guideline check in clang-tidy though as it's now wholly redundant, isn't it? Perhaps that check should ensure this warning is enabled and

[clang] [clang] Implement statement printer for EmbedExpr (PR #117770)

2024-11-27 Thread via cfe-commits
@@ -3902,6 +3902,8 @@ void Preprocessor::HandleEmbedDirectiveImpl( } EmbedAnnotationData *Data = new (BP) EmbedAnnotationData; + Data->Filename = Filename; + Data->IsAngled = IsAngled; Data->BinaryData = BinaryContents; circl-lastname wrote: I'm not

[clang] Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (PR #91991)

2024-11-27 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Verified that it no longer crashes. https://github.com/llvm/llvm-project/pull/91991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread via cfe-commits
@@ -7982,6 +7982,9 @@ def err_bad_reinterpret_cast_reference : Error< def warn_undefined_reinterpret_cast : Warning< "reinterpret_cast from %0 to %1 has undefined behavior">, InGroup, DefaultIgnore; +def warn_static_downcast : Warning< + "static downcast from %0 to %1 is p

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2024-11-27 Thread Joel E. Denny via cfe-commits
jdenny-ornl wrote: > > For some codes, I get the following error for a gfx906: > > ``` > > LLVM ERROR: Relocation for CG Profile could not be created: unknown > > relocation name > > ``` > Not sure if this is still relevant, but I think #114617 should fix this > issue. The ASM builder was try

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread Erich Keane via cfe-commits
@@ -1759,6 +1759,16 @@ TryStaticDowncast(Sema &Self, CanQualType SrcType, CanQualType DestType, Self.BuildBasePathArray(Paths, BasePath); Kind = CK_BaseToDerived; + + if (!CStyle && Self.LangOpts.CPlusPlus && SrcType->getAsCXXRecordDecl()->isPolymorphic()) { +auto D

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/117914 >From d1e2a9ac8e329d0786f41a3ef4bedb61d7f7ffe5 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 27 Nov 2024 20:03:29 +0100 Subject: [PATCH 1/2] [Clang] Diagnose down casting static_cast Invalid down ca

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread Erich Keane via cfe-commits
@@ -7982,6 +7982,9 @@ def err_bad_reinterpret_cast_reference : Error< def warn_undefined_reinterpret_cast : Warning< "reinterpret_cast from %0 to %1 has undefined behavior">, InGroup, DefaultIgnore; +def warn_static_downcast : Warning< + "static downcast from %0 to %1 is p

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-11-27 Thread James Y Knight via cfe-commits
jyknight wrote: This is the intended/expected behavior. On every other platform, `-isysroot` is supposed to be an override setting the sysroot only for the header files, and _never_ overriding the linker sysroot. The `--sysroot` flag, on the other hand, sets the value used for both libraries

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Alex Rønne Petersen via cfe-commits
@@ -252,9 +252,17 @@ static const char *getLDMOption(const llvm::Triple &T, const ArgList &Args) { case llvm::Triple::ppc64le: return "elf64lppc"; case llvm::Triple::riscv32: -return "elf32lriscv"; - case llvm::Triple::riscv64: -return "elf64lriscv"; + case l

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp edited https://github.com/llvm/llvm-project/pull/117865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-27 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp updated https://github.com/llvm/llvm-project/pull/116608 From a6ec7f3cff4ae825a3be289636a4cf2c2e436f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 18 Nov 2024 13:12:30 +0100 Subject: [PATCH] [libunwind] Fix compilation for the x32

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2024-11-27 Thread Shilei Tian via cfe-commits
@@ -196,13 +203,21 @@ class GlobalDecl { } GlobalDecl getWithKernelReferenceKind(KernelReferenceKind Kind) { -assert(isa(getDecl()) && - cast(getDecl())->hasAttr() && - "Decl is not a GPU kernel!"); +assert((isa(getDecl()) && +cast(g

[clang] [Serialization] Downgrade error to warning for inconsistent language flags (PR #117840)

2024-11-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I don't think the discussion here has run its course > https://github.com/llvm/llvm-project/pull/115416 Yeah, I had explicitly asked for a review from @Bigcheese before that landed, so I was surprised to see that get merged. > I don't think we should force users for our t

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-27 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117732 >From ca2184f07dbceda33ca429b3d63015d49fef3684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 27 Nov 2024 08:54:51 +0100 Subject: [PAT

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2024-11-27 Thread Peter Smith via cfe-commits
@@ -16,7 +16,7 @@ // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -flto=thin -c -o %t.call_thin.bc -DCALL_LIB // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -flto=thin -c -o %t.define_thin.bc -DDEFINE_LIB -// RUN

[clang] [Clang][AArch64]Refactor typespec handling in SveEmitter.cpp (PR #117717)

2024-11-27 Thread via cfe-commits
https://github.com/SpencerAbson updated https://github.com/llvm/llvm-project/pull/117717 >From eac5704250a454ede434d4967fb88902b689fce3 Mon Sep 17 00:00:00 2001 From: Spencer Abson Date: Tue, 26 Nov 2024 13:49:12 + Subject: [PATCH 1/5] Refactor parts of SveEmitter.cpp --- clang/include/cl

[clang] [Clang] skip consumed analysis for consteval conditions in control-flow terminators (PR #117403)

2024-11-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/117403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add captured parameters to ReferencedDecls for lamb… (PR #117771)

2024-11-27 Thread Yitzhak Mandelbaum via cfe-commits
@@ -281,6 +282,17 @@ ReferencedDecls getReferencedDecls(const FunctionDecl &FD) { Visitor.TraverseStmt(FD.getBody()); if (const auto *CtorDecl = dyn_cast(&FD)) Visitor.traverseConstructorInits(CtorDecl); + if (const auto *Method = dyn_cast(&FD); ymand

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-11-27 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/110102 >From 7d8646edb373c38ee761de2c338c45b967a423e7 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 25 Sep 2024 16:55:39 +0100 Subject: [PATCH 1/2] [Clang] Add fake use emission to Clang with -fextend-lifeti

[clang] 8d6c73c - [OpenACC] enable 'deviceptr' for combined constructs.

2024-11-27 Thread via cfe-commits
Author: erichkeane Date: 2024-11-27T07:04:15-08:00 New Revision: 8d6c73cbf53bd6eb410ac08836e7b128d4a99a16 URL: https://github.com/llvm/llvm-project/commit/8d6c73cbf53bd6eb410ac08836e7b128d4a99a16 DIFF: https://github.com/llvm/llvm-project/commit/8d6c73cbf53bd6eb410ac08836e7b128d4a99a16.diff LO

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -104,15 +146,35 @@ void ChrootChecker::evalChdir(const CallEvent &Call, CheckerContext &C) const { R = R->StripCasts(); if (const StringRegion* StrRegion= dyn_cast(R)) { const StringLiteral* Str = StrRegion->getStringLiteral(); - if (Str->getString() == "

[clang] [clang][dataflow] Add captured parameters to ReferencedDecls for lamb… (PR #117771)

2024-11-27 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi closed https://github.com/llvm/llvm-project/pull/117771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Jessica Clarke via cfe-commits
@@ -0,0 +1,158 @@ +//===--- RISCVRemoveBackToBackBranches.cpp ===// +// +// 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] Skip escaped newlines before checking for whitespace in Lexer::getRawToken. (PR #117548)

2024-11-27 Thread Samira Bazuzi via cfe-commits
bazuzi wrote: Added a test for getRawToken where the EXPECT_TRUE failed before this change. https://github.com/llvm/llvm-project/pull/117548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang-tools-extra] users/ccc/fix/module use internal linkage (PR #117901)

2024-11-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/117901 - **[ast-matcher] add `exportDecl` matcher** - **[clang-tidy][use-internal-linkage]fix false positives for `ExportDecl`** >From d1d0722e833a9b66206c008a4cd3f6c5b4548b5c Mon Sep 17 00:00:00 2001 From: Congco

[clang] [clang-tools-extra] users/ccc/fix/module use internal linkage (PR #117901)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes - **[ast-matcher] add `exportDecl` matcher** - **[clang-tidy][use-internal-linkage]fix false positives for `ExportDecl`** --- Full diff: https://github.com/llvm/llvm-project/pull/117901.diff

[clang] [clang-tools-extra] users/ccc/fix/module use internal linkage (PR #117901)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Congcong Cai (HerrCai0907) Changes - **[ast-matcher] add `exportDecl` matcher** - **[clang-tidy][use-internal-linkage]fix false positives for `ExportDecl`** --- Full diff: https://github.com/llvm/llvm-project/pull/117901.diff 7 Files Af

[clang] [clang-tools-extra] users/ccc/fix/module use internal linkage (PR #117901)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes - **[ast-matcher] add `exportDecl` matcher** - **[clang-tidy][use-internal-linkage]fix false positives for `ExportDecl`** --- Full diff: https://github.com/llvm/llvm-project/pull/117901.diff 7 Fil

[clang] [clang-tools-extra] users/ccc/fix/module use internal linkage (PR #117901)

2024-11-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/117901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-11-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/117901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-11-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/117901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8c1bd97 - [OpenACC] Expose 'no_create' clause in combined constructs

2024-11-27 Thread via cfe-commits
Author: erichkeane Date: 2024-11-27T12:03:48-08:00 New Revision: 8c1bd9792be1d7d19eebce57be556d5cadeb2d15 URL: https://github.com/llvm/llvm-project/commit/8c1bd9792be1d7d19eebce57be556d5cadeb2d15 DIFF: https://github.com/llvm/llvm-project/commit/8c1bd9792be1d7d19eebce57be556d5cadeb2d15.diff LO

[clang] 854d730 - [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (#113470)

2024-11-27 Thread via cfe-commits
Author: Vigneshwar Jayakumar Date: 2024-11-27T14:20:07-06:00 New Revision: 854d7301f989dd1e3c838ef4f48cb57bb7d496e0 URL: https://github.com/llvm/llvm-project/commit/854d7301f989dd1e3c838ef4f48cb57bb7d496e0 DIFF: https://github.com/llvm/llvm-project/commit/854d7301f989dd1e3c838ef4f48cb57bb7d496e

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Craig Topper via cfe-commits
@@ -252,9 +252,17 @@ static const char *getLDMOption(const llvm::Triple &T, const ArgList &Args) { case llvm::Triple::ppc64le: return "elf64lppc"; case llvm::Triple::riscv32: -return "elf32lriscv"; - case llvm::Triple::riscv64: -return "elf64lriscv"; + case l

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-27 Thread via cfe-commits
https://github.com/bcahoon closed https://github.com/llvm/llvm-project/pull/113470 ___ 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 -l flags in config files (PR #117573)

2024-11-27 Thread David Truby via cfe-commits
https://github.com/DavidTruby approved this pull request. LGTM. Would be good if someone from the clang side of things can approve as well, as this is a fairly big functionality change for config files. https://github.com/llvm/llvm-project/pull/117573 ___

[clang] [clang] Move warning about memset/memcpy to NonTriviallyCopyable type… (PR #117387)

2024-11-27 Thread via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wnontrivial-memcall %s + +extern "C" void *memcpy(void *s1, const void *s2, unsigned n); + +class TriviallyCopyable {}; +class NonTriviallyCopyable { NonTriviallyCopyable(const NonTriviallyCopyable&);}; +struc

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-27 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/116257 >From eb6fea771b0824fef979e5eef26718ecbc8c7f56 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 14 Nov 2024 16:07:32 + Subject: [PATCH 1/7] [NFC][clang][FMV][TargetInfo] Refactor API for FMV

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread via cfe-commits
@@ -80,19 +88,53 @@ bool ChrootChecker::evalCall(const CallEvent &Call, CheckerContext &C) const { void ChrootChecker::evalChroot(const CallEvent &Call, CheckerContext &C) const { ProgramStateRef state = C.getState(); ProgramStateManager &Mgr = state->getStateManager(); +

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Djordje Todorovic via cfe-commits
@@ -0,0 +1,158 @@ +//===--- RISCVRemoveBackToBackBranches.cpp ===// +// +// 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] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-27 Thread Justin Fargnoli via cfe-commits
@@ -156,13 +156,15 @@ FEATURE(objc_class_property, LangOpts.ObjC) FEATURE(objc_c_static_assert, LangOpts.C11) FEATURE(objc_cxx_static_assert, LangOpts.CPlusPlus11) EXTENSION(objc_c_static_assert, true) -// C11 features +// C11 features justinfargnoli wrote: D

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread via cfe-commits
https://github.com/SunilKuravinakop created https://github.com/llvm/llvm-project/pull/117904 Support for dispatch construct (Sema & Codegen) support. Support for clauses: depend, novariants & nocontext. >From 8475b0745a1107d5268f95cdea835e6750053388 Mon Sep 17 00:00:00 2001 From: Sunil Kuravin

[clang] [Clang] Fix constexpr-ness on implicitly deleted destructors (PR #116359)

2024-11-27 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/116359 >From c950170822a58ca98e3f50e95b160c83ec1c63f1 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Fri, 15 Nov 2024 21:49:23 +0800 Subject: [PATCH 1/5] [Clang] Fix constexpr-ness on implicitly deleted destr

[clang] [clang] recognize hexagon-*-ld.lld variants (PR #117338)

2024-11-27 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/117338 >From af213f3a80964faa3b80c95f8575a08c3dbd18c8 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Thu, 21 Nov 2024 19:46:04 -0800 Subject: [PATCH] [clang] recognize hexagon-*-ld.lld variants If we create a cross

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (SunilKuravinakop) Changes Support for dispatch construct (Sema & Codegen) support. Support for clauses: depend, novariants & nocontext. --- Patch is 30.07 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/ll

[clang] [llvm] Support for dispatch construct (Sema & Codegen) support. (PR #117904)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp Author: None (SunilKuravinakop) Changes Support for dispatch construct (Sema & Codegen) support. Support for clauses: depend, novariants & nocontext. --- Patch is 30.07 KiB, truncated to 20.00 KiB below, full version: https://github.com/

[clang] 969b765 - [OpenACC] Enable 'wait' for combined constructs

2024-11-27 Thread via cfe-commits
Author: erichkeane Date: 2024-11-27T08:32:33-08:00 New Revision: 969b7658fe34cf7638e1385d813e765a4c61dfc7 URL: https://github.com/llvm/llvm-project/commit/969b7658fe34cf7638e1385d813e765a4c61dfc7 DIFF: https://github.com/llvm/llvm-project/commit/969b7658fe34cf7638e1385d813e765a4c61dfc7.diff LO

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-27 Thread via cfe-commits
EugeneZelenko wrote: @hjanuschka: Thank you for helping all poor souls like me with looming C++20/23 migration in some code bases :-) https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Clang] skip consumed analysis for consteval conditions in control-flow terminators (PR #117403)

2024-11-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin` running on `doug-worker-3` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/5268 Here is the r

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-27 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/117732 >From ca2184f07dbceda33ca429b3d63015d49fef3684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 27 Nov 2024 08:54:51 +0100 Subject: [PAT

[clang] [clang-repl]: Print stack-trace on crash (PR #117896)

2024-11-27 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis closed https://github.com/llvm/llvm-project/pull/117896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Avoid re-evaluating field bitwidth (PR #117732)

2024-11-27 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: Meh, saving a `ConstantExpr` in the `FieldDecl` doesn't work properly, since we need to support having arbitrary exprs in case the bitwidth is dependent. https://github.com/llvm/llvm-project/pull/117732 _

[clang] [analyzer][NFC] Cleanup BranchNodeBuilder (PR #117898)

2024-11-27 Thread Balazs Benics via cfe-commits
steakhal wrote: @Xazax-hun I don't really have the time for this one. Could you take it over? https://github.com/llvm/llvm-project/pull/117898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-11-27 Thread via cfe-commits
@@ -1898,6 +1882,55 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI, return nullptr; } +// Turn select (Cmp X C1) (BOp X C2) C3 +// -> BOp (min/max X C1) C2 +// iff C3 == BOp C1 C2 +// Fold `select` with a const operand to a binary operation. +// Thi

[clang] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread Balazs Benics via cfe-commits
@@ -98,9 +98,9 @@ void ChrootChecker::evalChroot(const CallEvent &Call, CheckerContext &C) const { const auto *CE = cast(Call.getOriginExpr()); const LocationContext *LCtx = C.getLocationContext(); - NonLoc RetVal = - SVB.conjureSymbolVal(/*SymbolTag=*/nullptr,

[clang] c60b055 - Reapply "Respect the [[clang::unsafe_buffer_usage]] attribute for field and constructor initializers (#91991)"

2024-11-27 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2024-11-27T11:18:05-08:00 New Revision: c60b055d463a3e9f18a494aec075f35d38d447a0 URL: https://github.com/llvm/llvm-project/commit/c60b055d463a3e9f18a494aec075f35d38d447a0 DIFF: https://github.com/llvm/llvm-project/commit/c60b055d463a3e9f18a494aec075f35d38d447a0.diff LOG

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-11-27 Thread via cfe-commits
veera-sivarajan wrote: > You can convert the icmp into icmp ule i32 %x, 1 with > getFlippedStrictnessPredicateAndConstant. I'm sorry, could you please explain why this is necessary there? https://github.com/llvm/llvm-project/pull/116888 ___ cfe-commi

[clang] [llvm] [InstCombine] Fold `X Pred C2 ? X BOp C1 : C2 BOp C1` to `min/max(X, C2) BOp C1` (PR #116888)

2024-11-27 Thread via cfe-commits
https://github.com/veera-sivarajan updated https://github.com/llvm/llvm-project/pull/116888 >From 4fe3c73cdfd89eb08b9491774e08fa5d3d48d26b Mon Sep 17 00:00:00 2001 From: Veera Date: Thu, 21 Nov 2024 20:55:55 + Subject: [PATCH 1/2] Add Test --- .../InstCombine/canonicalize-const-to-bop.ll

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/117914 Invalid down casts are a source of vulnerabilities. Its allowance in static_cast - which is otherwise relatively safe - are recognized as dangerous by various safety guidelines such as the core guidelines and m

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes Invalid down casts are a source of vulnerabilities. Its allowance in static_cast - which is otherwise relatively safe - are recognized as dangerous by various safety guidelines such as the core guidelines and mi

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 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 bbbaeb5584b5f1ab38cc86a9e8ed64ec1dc926b6 d1e2a9ac8e329d0786f41a3ef4bedb61d7f7ffe5 --e

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread Erich Keane via cfe-commits
erichkeane wrote: > If we don't feel like enabling this by default, a strategy would be to attach > this warning to some `-fhardened` flag (as available in GCC) IMO, this is useful as on-by-default, but under its own flag. I haven't looked at the 'diff' yet, but that is my thoughts on it. ht

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread via cfe-commits
cor3ntin wrote: If we don't feel like enabling this by default, a strategy would be to attach this warning to some `-fhardened` flag (as available in GCC) https://github.com/llvm/llvm-project/pull/117914 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread Erich Keane via cfe-commits
@@ -593,6 +593,10 @@ Improvements to Clang's diagnostics - Clang now supports using alias templates in deduction guides, aligning with the C++ standard, which treats alias templates as synonyms for their underlying types (#GH54909). +- Added ``-Wstatic-downcast`` to diagno

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread Erich Keane via cfe-commits
@@ -7982,6 +7982,9 @@ def err_bad_reinterpret_cast_reference : Error< def warn_undefined_reinterpret_cast : Warning< "reinterpret_cast from %0 to %1 has undefined behavior">, InGroup, DefaultIgnore; +def warn_static_downcast : Warning< + "static downcast from %0 to %1 is p

[clang] [clang] Implement statement printer for EmbedExpr (PR #117770)

2024-11-27 Thread via cfe-commits
@@ -3902,6 +3902,8 @@ void Preprocessor::HandleEmbedDirectiveImpl( } EmbedAnnotationData *Data = new (BP) EmbedAnnotationData; + Data->Filename = Filename; + Data->IsAngled = IsAngled; Data->BinaryData = BinaryContents; Sirraide wrote: > where can we

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-11-27 Thread Tom Stellard via cfe-commits
tstellar wrote: > Well, we're currently approaching this from the angle of "expose everything > and then the user can do whatever they want", but perhaps the discussion we > should be having is "what use cases do we explicitly want to support?" and > then we write plugins to demonstrate that w

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

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

[clang] [Clang] Diagnose down casting static_cast (PR #117914)

2024-11-27 Thread Aaron Ballman via cfe-commits
@@ -1759,6 +1759,16 @@ TryStaticDowncast(Sema &Self, CanQualType SrcType, CanQualType DestType, Self.BuildBasePathArray(Paths, BasePath); Kind = CK_BaseToDerived; + + if (!CStyle && Self.LangOpts.CPlusPlus && SrcType->getAsCXXRecordDecl()->isPolymorphic()) { +auto D

[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

2024-11-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/101469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >