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

2024-11-27 Thread Balazs Benics via cfe-commits
@@ -24,21 +26,30 @@ using namespace clang; using namespace ento; -namespace { - // enum value that represent the jail state -enum Kind { NO_CHROOT, ROOT_CHANGED, JAIL_ENTERED }; +enum ChrootKind { NO_CHROOT, ROOT_CHANGED, ROOT_CHANGE_FAILED, JAIL_ENTERED }; -bool isRootChan

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

2024-11-27 Thread Balazs Benics 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] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread Balazs Benics 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] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread Balazs Benics 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] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread Balazs Benics via cfe-commits
@@ -121,17 +183,40 @@ void ChrootChecker::checkPreCall(const CallEvent &Call, return; // If jail state is ROOT_CHANGED, generate BugReport. - void *const* k = C.getState()->FindGDM(ChrootChecker::getTag()); - if (k) -if (isRootChanged((intptr_t) *k)) - if (Exp

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

2024-11-27 Thread Balazs Benics 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] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread Balazs Benics via cfe-commits
@@ -121,17 +183,40 @@ void ChrootChecker::checkPreCall(const CallEvent &Call, return; // If jail state is ROOT_CHANGED, generate BugReport. - void *const* k = C.getState()->FindGDM(ChrootChecker::getTag()); - if (k) -if (isRootChanged((intptr_t) *k)) - if (Exp

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

2024-11-27 Thread Balazs Benics 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] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread Balazs Benics 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] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread Balazs Benics via cfe-commits
@@ -1750,6 +1750,21 @@ Critical section handling functions modeled by this checker: } } +.. _unix-Chroot: + +unix.Chroot (C) +" steakhal wrote: ```suggestion unix.Chroot (C) """ ``` https://github.com/llvm/llvm-project/pu

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

2024-11-27 Thread Balazs Benics via cfe-commits
@@ -121,17 +183,40 @@ void ChrootChecker::checkPreCall(const CallEvent &Call, return; // If jail state is ROOT_CHANGED, generate BugReport. - void *const* k = C.getState()->FindGDM(ChrootChecker::getTag()); - if (k) -if (isRootChanged((intptr_t) *k)) - if (Exp

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

2024-11-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. This checker deserved some love for sure. Thank you for pushing for this. I left quite a few comments, touching style and also direction of this patch. Thanks Vince! https://github.com/llvm/llvm-project/pull/117791 _

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

2024-11-27 Thread Balazs Benics via cfe-commits
@@ -121,17 +183,40 @@ void ChrootChecker::checkPreCall(const CallEvent &Call, return; // If jail state is ROOT_CHANGED, generate BugReport. - void *const* k = C.getState()->FindGDM(ChrootChecker::getTag()); - if (k) -if (isRootChanged((intptr_t) *k)) - if (Exp

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

2024-11-27 Thread Balazs Benics 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] [analyzer] Modernize, improve and promote chroot checker (PR #117791)

2024-11-27 Thread Balazs Benics via cfe-commits
@@ -1750,6 +1750,21 @@ Critical section handling functions modeled by this checker: } } +.. _unix-Chroot: + +unix.Chroot (C) +" +Check improper use of chroot. steakhal wrote: This documentation should explain how is `chroot` used inco

[clang] [flang] [flang] Preserve fixed form in fc1 -x value (PR #117563)

2024-11-27 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > However, -save-temps doesn't appear to work for me at all. You need to add -fno-integrated-as. This is a known limitation: * [save-temps.f90](https://github.com/llvm/llvm-project/blob/main/flang/test/Driver/save-temps.f90) >It feels wrong that -save-temps runs the prepro

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2024-11-27 Thread via cfe-commits
https://github.com/cor3ntin requested changes to this pull request. I'd like more time to think about this change and discuss it with @AaronBallman / @erichkeane https://github.com/llvm/llvm-project/pull/117437 ___ cfe-commits mailing list cfe-commit

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

2024-11-27 Thread via cfe-commits
vabridgers wrote: @steakhal and @NagyDonat , thanks for the comments. I'll address and update the patch. Best https://github.com/llvm/llvm-project/pull/117791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

2024-11-27 Thread Lu Weining via cfe-commits
https://github.com/SixWeining closed https://github.com/llvm/llvm-project/pull/114189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Migrate away from PointerUnion::{is, get} (NFC) (PR #117498)

2024-11-27 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/117498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Preserve fixed form in fc1 -x value (PR #117563)

2024-11-27 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > flang -E is already consistent here, it always produces fixed form output. It would be good to document and to test that - perhaps that's already the case? > So I think we can just teach flang -fc1 that '.i' Agreed, and this should be trivial to implement. Thanks @DavidT

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

2024-11-27 Thread Timm Baeder via cfe-commits
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: [PATCH] Save FieldDecl BitWidth as a ConstantExpr ---

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/117863 >From c725ed73555a3b9080541fe7d4a71ceef0b04762 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Mon, 25 Nov 2024 16:06:53 +0100 Subject: [PATCH 1/2] [analyzer] Avoid out-of-order node traversal on void r

[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/3] [Clang] Fix constexpr-ness on implicitly deleted destr

[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] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2024-11-27 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro converted_to_draft 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

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

2024-11-27 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro 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

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

2024-11-27 Thread via cfe-commits
cor3ntin 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. https://github.com/llvm/llvm-project/pul

[clang] [flang] [flang] Preserve fixed form in fc1 -x value (PR #117563)

2024-11-27 Thread David Truby via cfe-commits
DavidTruby wrote: I'm not sure if it's explicitly documented anywhere but there's a lot of tests, as you can see in the patch that introduced the behaviour here: https://reviews.llvm.org/D106727 Essentially since that patch the output is _always_ valid 72 width fixed form, and if the input wa

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-27 Thread Ulrich Weigand via cfe-commits
@@ -513,11 +514,26 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM, } // Handle floating-point types. + // Promote all f16 operations to float, with some exceptions below. + for (unsigned Opc = 0; Opc < ISD::BUILTIN_OP_END; ++Opc) +setOperati

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-27 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > Improved handling to utilize vector instructions when present. Thanks! >New VR16 regclass, but v8f16 _not_ legal. It might make sense to have it as a >legal type and e.g. do VL;VST when moving vectors in memory, and also set all >vector ops to "Expand". Not sure how trivial

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-27 Thread Ulrich Weigand via cfe-commits
@@ -1883,6 +1931,10 @@ void SystemZInstrInfo::getLoadStoreOpcodes(const TargetRegisterClass *RC, } else if (RC == &SystemZ::FP128BitRegClass) { LoadOpcode = SystemZ::LX; StoreOpcode = SystemZ::STX; + } else if (RC == &SystemZ::FP16BitRegClass || + RC ==

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-27 Thread Ulrich Weigand via cfe-commits
@@ -47,8 +49,11 @@ def LDR : UnaryRR <"ldr", 0x28, null_frag, FP64, FP64>; def LXR : UnaryRRE<"lxr", 0xB365, null_frag, FP128, FP128>; // For z13 we prefer LDR over LER to avoid partial register dependencies. -let isCodeGenOnly = 1 in - def LDR32 : UnaryRR<"ldr", 0x28, nul

[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: Is there

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. I didn't systematically analyze all the small details of this commit, but overall it looks good to me. https://github.com/llvm/llvm-project/pull/117863 ___ cfe-commits mailing list cfe-commits@l

[clang] [Clang][Parser] Make 'T...[N]' within a function parameter a valid pack expansion prior to C++2c (PR #116332)

2024-11-27 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thanks you all for the feedback. So I'm going to keep it invalid and just add a warning for clarity. https://github.com/llvm/llvm-project/pull/116332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[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] Codegen changes for strict modifier with grainsize/num_tasks of taskloop construct (PR #117196)

2024-11-27 Thread CHANDRA GHALE via cfe-commits
@@ -0,0 +1,256 @@ +// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -x c++ -emit-llvm %s -o - | FileCheck %s chandraghale wrote: Updated with auto gen checks !! https://github.com/llvm/llvm-project/pull/117196 __

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

2024-11-27 Thread Raphael Moreira Zinsly via cfe-commits
https://github.com/rzinsly updated https://github.com/llvm/llvm-project/pull/117612 >From f6bb44ca2242623399eb0ea946f38399fed3807c Mon Sep 17 00:00:00 2001 From: Raphael Moreira Zinsly Date: Tue, 26 Nov 2024 16:40:37 -0300 Subject: [PATCH 1/3] [NFC][RISCV] Remove CFIIndex argument from RISCVFr

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Balazs Benics via cfe-commits
@@ -278,7 +278,9 @@ class ExplodedNode : public llvm::FoldingSetNode { /// Useful for explaining control flow that follows the current node. /// If the statement belongs to a body-farmed definition, retrieve the /// call site for that definition. - const Stmt *getNextStm

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/117863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/117863 >From c725ed73555a3b9080541fe7d4a71ceef0b04762 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Mon, 25 Nov 2024 16:06:53 +0100 Subject: [PATCH 1/4] [analyzer] Avoid out-of-order node traversal on void r

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

2024-11-27 Thread via cfe-commits
circl-lastname wrote: > We probably want a changelog I put it in the C23 features section, if that's ok https://github.com/llvm/llvm-project/pull/117770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/117863 >From c725ed73555a3b9080541fe7d4a71ceef0b04762 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Mon, 25 Nov 2024 16:06:53 +0100 Subject: [PATCH 1/5] [analyzer] Avoid out-of-order node traversal on void r

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

2024-11-27 Thread via cfe-commits
https://github.com/circl-lastname updated https://github.com/llvm/llvm-project/pull/117770 >From 184359e8be9eab570ef01810d5d3a6ba4a48afe9 Mon Sep 17 00:00:00 2001 From: circl Date: Tue, 26 Nov 2024 18:52:19 +0100 Subject: [PATCH 1/2] [clang] Store filename in EmbedExpr --- clang/include/clang

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 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/117863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Fix MS Mangle concept uneval context template instantiation crash (PR #117845)

2024-11-27 Thread via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -std=c++20 -fms-compatibility -fms-compatibility-version=19.33 -emit-llvm %s -o - -triple=x86_64-windows-msvc | FileCheck %s zmodem wrote: I think doing codegen (-emit-llvm) in clang/test/AST/ is unusual, those tests normal

[clang] [Clang][AST] Fix MS Mangle concept uneval context template instantiation crash (PR #117845)

2024-11-27 Thread via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -std=c++20 -fms-compatibility -fms-compatibility-version=19.33 -emit-llvm %s -o - -triple=x86_64-windows-msvc | FileCheck %s + +template +concept C = requires +{ +{ T::test([](){}) }; +}; + +template +struct Widget {}; + +template +stru

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -278,7 +278,9 @@ class ExplodedNode : public llvm::FoldingSetNode { /// Useful for explaining control flow that follows the current node. /// If the statement belongs to a body-farmed definition, retrieve the /// call site for that definition. - const Stmt *getNextStm

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

2024-11-27 Thread Raphael Moreira Zinsly via cfe-commits
https://github.com/rzinsly edited https://github.com/llvm/llvm-project/pull/117612 ___ 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 Sam Elliott 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] [llvm] Codegen changes for strict modifier with grainsize/num_tasks of taskloop construct (PR #117196)

2024-11-27 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/117196 >From d19f41d39237b3d4fd2923f037743ddd495d5c9f Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Thu, 21 Nov 2024 11:15:11 -0600 Subject: [PATCH 1/5] Initial Codegen changes for strict modifier with grain

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

2024-11-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. 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][Parser] Make 'T...[N]' within a function parameter a valid pack expansion prior to C++2c (PR #116332)

2024-11-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/116332 >From 5973de1d4c368a26fd179954a13de94595f35575 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 15 Nov 2024 14:09:14 +0800 Subject: [PATCH 1/3] [Clang][Parser] Make 'T...[N]' within a function parameter a

[clang] [Clang][Parser] Add a warning to ambiguous uses of T...[N] types (PR #116332)

2024-11-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/116332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Add a warning to ambiguous uses of T...[N] types (PR #116332)

2024-11-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/116332 >From 5973de1d4c368a26fd179954a13de94595f35575 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 15 Nov 2024 14:09:14 +0800 Subject: [PATCH 1/4] [Clang][Parser] Make 'T...[N]' within a function parameter a

[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][Parser] Make 'T...[N]' within a function parameter a valid pack expansion prior to C++2c (PR #116332)

2024-11-27 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/116332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang] LoongArch64 support for BIND(C) derived types in mabi=lp64d. (PR #117108)

2024-11-27 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. The code changes look good to me. I am not at all familiar with LoongArch64 so it would be best if somebody else reviews that this implements the ABI correctly. https://github.com/llvm/llvm-project/pull/117108 ___

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/117863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Gábor Horváth via cfe-commits
@@ -347,8 +347,11 @@ const Stmt *ExplodedNode::getStmtForDiagnostics() const { return nullptr; } -const Stmt *ExplodedNode::getNextStmtForDiagnostics() const { +const Stmt *ExplodedNode::getNextStmtForDiagnostics(bool skipPurge) const { for (const ExplodedNode *N = getFir

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Gábor Horváth via cfe-commits
@@ -278,7 +278,9 @@ class ExplodedNode : public llvm::FoldingSetNode { /// Useful for explaining control flow that follows the current node. /// If the statement belongs to a body-farmed definition, retrieve the /// call site for that definition. - const Stmt *getNextStm

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: Great fix! I have one question inline. https://github.com/llvm/llvm-project/pull/117863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Gábor Horváth via cfe-commits
@@ -278,7 +278,9 @@ class ExplodedNode : public llvm::FoldingSetNode { /// Useful for explaining control flow that follows the current node. /// If the statement belongs to a body-farmed definition, retrieve the /// call site for that definition. - const Stmt *getNextStm

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/117863 >From c725ed73555a3b9080541fe7d4a71ceef0b04762 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Mon, 25 Nov 2024 16:06:53 +0100 Subject: [PATCH 1/3] [analyzer] Avoid out-of-order node traversal on void r

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -347,8 +347,11 @@ const Stmt *ExplodedNode::getStmtForDiagnostics() const { return nullptr; } -const Stmt *ExplodedNode::getNextStmtForDiagnostics() const { +const Stmt *ExplodedNode::getNextStmtForDiagnostics(bool skipPurge) const { for (const ExplodedNode *N = getFir

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -278,7 +278,9 @@ class ExplodedNode : public llvm::FoldingSetNode { /// Useful for explaining control flow that follows the current node. /// If the statement belongs to a body-farmed definition, retrieve the /// call site for that definition. - const Stmt *getNextStm

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

2024-11-27 Thread Mariya Podchishchaeva via cfe-commits
@@ -3902,6 +3902,8 @@ void Preprocessor::HandleEmbedDirectiveImpl( } EmbedAnnotationData *Data = new (BP) EmbedAnnotationData; + Data->Filename = Filename; + Data->IsAngled = IsAngled; Data->BinaryData = BinaryContents; Fznamznon wrote: None that I c

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/117863 ___ 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: 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] [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] 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: Similar

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

2024-11-27 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/117863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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: > Indeed, replacing the lambda with a user declared struct with the same > `operator()` works: https://godbolt.org/z/8GWv6d88K > > May I try to see if I find a way to delay the instantiations of lambda call > operators? This is unfortunately a sizable amount of work. We're

[clang] [analyzer] Avoid out-of-order node traversal on void return (PR #117863)

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

[clang-tools-extra] [clang-tidy] fix cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-11-27 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Maybe we should move this check to bugprone and use some configuration to enforce guideline in cppcoreguidelines parts. WDYT? @carlosgalvezp @PiotrZSL https://github.com/llvm/llvm-project/pull/116591 ___ cfe-commits mailing list cfe

[clang] dddeec4 - [analyzer] Avoid out-of-order node traversal on void return (#117863)

2024-11-27 Thread via cfe-commits
Author: Arseniy Zaostrovnykh Date: 2024-11-27T14:27:31+01:00 New Revision: dddeec4becabf71d4067080bcc2c09a9e67c3025 URL: https://github.com/llvm/llvm-project/commit/dddeec4becabf71d4067080bcc2c09a9e67c3025 DIFF: https://github.com/llvm/llvm-project/commit/dddeec4becabf71d4067080bcc2c09a9e67c302

[clang] [Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (PR #117437)

2024-11-27 Thread Erich Keane via cfe-commits
erichkeane wrote: > I'd like more time to think about this change and discuss it with > @AaronBallman / @erichkeane I'm having some doubts too. This seems like the sort of thing we usually trace by knowing the original template, and seeing if we aren't that. So find the thing that owns this

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

2024-11-27 Thread Michael Maitland via cfe-commits
michaelmaitland wrote: Please split a3ed3550aed41e102bf41ec347f19f9a3c339b2b into multiple commits (and eventually PRs). One for CPU definition and one for scheduler model. https://github.com/llvm/llvm-project/pull/117865 ___ cfe-commits mailing list

[clang] [Clang] replace 'bitfield' with 'bit-field' for consistency (PR #117881)

2024-11-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/117881 Fixes #117711 >From 114da7238abafc74967c47ead92ac5fa0a380210 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 27 Nov 2024 15:45:29 +0200 Subject: [PATCH] [Clang] replace 'bitfield' with 'bit-field' for

[clang] [Clang] replace 'bitfield' with 'bit-field' for consistency (PR #117881)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Oleksandr T. (a-tarasyuk) Changes Fixes #117711 --- Full diff: https://github.com/llvm/llvm-project/pull/117881.diff 4 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticASTKinds.td (+4-4) - (modified) clang/inclu

[clang] [Clang] replace 'bitfield' with 'bit-field' for consistency (PR #117881)

2024-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #117711 --- Full diff: https://github.com/llvm/llvm-project/pull/117881.diff 4 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticASTKinds.td (+4-4) - (modified) clang/include/clang

[clang] [llvm] Codegen changes for strict modifier with grainsize/num_tasks of taskloop construct (PR #117196)

2024-11-27 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/117196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] replace 'bitfield' with 'bit-field' for consistency (PR #117881)

2024-11-27 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman is it ok to skip the release notes for these minor changes? https://github.com/llvm/llvm-project/pull/117881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

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

2024-11-27 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -emit-llvm -o - %s | FileCheck %s shiltian wrote: the pair can be "detected" or checked by the check lines and any minor change could lead to a test failure, thus makes it more robust. https:/

<    1   2   3   4   5