[clang] [CIR] Upstream X86 builtin _mm_prefetch, _mm_clflush, fence and pause (PR #167401)

2025-11-14 Thread Andy Kaylor via cfe-commits
@@ -43,11 +85,28 @@ mlir::Value CIRGenFunction::emitX86BuiltinExpr(unsigned builtinID, // Find out if any arguments are required to be integer constant expressions. assert(!cir::MissingFeatures::handleBuiltinICEArguments()); + // The operands of the builtin call + llvm:

[clang-tools-extra] [clang-tidy] Add misc-bool-bitwise-operation check (PR #167552)

2025-11-14 Thread via cfe-commits
@@ -0,0 +1,307 @@ +//===--- BoolBitwiseOperationCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [BoundsSafety] build TypeLoc for CountAttributedType (PR #167287)

2025-11-14 Thread Aaron Ballman via cfe-commits
@@ -1303,18 +1305,25 @@ class ObjCInterfaceTypeLoc : public ConcreteTypeLoc { public: TypeLoc getInnerLoc() const { return getInnerTypeLoc(); } QualType getInnerType() const { return getTypePtr()->desugar(); } void initializeLocal(ASTContext &Context, SourceLocation Loc

[clang-tools-extra] [clang-tidy][docs][NFC] Enforce 80 characters limit (2/N) (PR #167632)

2025-11-14 Thread via cfe-commits
@@ -5,5 +5,6 @@ clang-analyzer-security.insecureAPI.decodeValueOfObjCType Warn on uses of the '-decodeValueOfObjCType:at:' method. -The clang-analyzer-security.insecureAPI.decodeValueOfObjCType check is an alias of -Clang Static Analyzer security.insecureAPI.decodeValueOfObj

[clang] [CIR] Upstream isfpclass op (PR #166037)

2025-11-14 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,50 @@ +//===- FPEnv.h FP Environment --*- C++ -*-===// andykaylor wrote: This file is no longer needed. https://github.com/llvm/llvm-project/pull/166037 ___ cfe-commits mail

[clang-tools-extra] [clang-tidy][docs][NFC] Enforce 80 characters limit (1/N) (PR #167492)

2025-11-14 Thread via cfe-commits
@@ -3,8 +3,9 @@ android-cloexec-pipe2 = -This check ensures that pipe2() is called with the O_CLOEXEC flag. The check also -adds the O_CLOEXEC flag that marks the file descriptor to be closed in child processes. +This check ensures that pipe2() is called

[clang] Adding support for iterator in motion clauses. (PR #159112)

2025-11-14 Thread Alexey Bataev via cfe-commits
@@ -8649,6 +8664,21 @@ class MappableExprsHandler { if (llvm::is_contained(C->getMotionModifiers(), OMPC_MOTION_MODIFIER_present)) Kind = Present; + if (llvm::is_contained(C->getMotionModifiers(), + OMP

[clang] [lldb] [llvm] [AArch64] Remove FEAT_TME assembly and ACLE support (PR #167687)

2025-11-14 Thread Jonathan Thackray via cfe-commits
jthackray wrote: > Only thing I thought might be here too was the resolver part of the function > multi versioning, but I don't see any sign of it in llvm-project or > llvm-test-suite so I assume it was never supported. > > (`compiler-rt/lib/builtins/cpu_model/aarch64/fmv/hwcap.inc` for exampl

[clang] [Clang] Add C++11 spelling support for guarded_by attribute (PR #167048)

2025-11-14 Thread Pranjal Prajapati via cfe-commits
@@ -394,6 +394,13 @@ til::SExpr *SExprBuilder::translateDeclRefExpr(const DeclRefExpr *DRE, if (const auto *VarD = dyn_cast(VD)) return translateVariable(VarD, Ctx); + if (const auto *FD = dyn_cast(VD)) { Pranjal095 wrote: I understand. Should I handl

[clang] [Clang][CodeGen] Use EmitLoadOfLValue instead of EmitLoadOfScalar to get LHS for complex compound assignment (PR #166798)

2025-11-14 Thread Benjamin Stott via cfe-commits
@@ -0,0 +1,10 @@ +// Reduced from https://github.com/llvm/llvm-project/issues/166512 +// RUN: %clang_cc1 %s -emit-obj -std=c23 -fsanitize=bool -o %t BStott6 wrote: If we're not testing for the assertion failure, this test might not be needed as the code generati

[clang] [CIR] Upstream l-value emission for ExprWithCleanups (PR #167938)

2025-11-14 Thread Erich Keane via cfe-commits
@@ -918,6 +912,35 @@ LValue CIRGenFunction::emitLValue(const Expr *e) { case Expr::CXXOperatorCallExprClass: case Expr::UserDefinedLiteralClass: return emitCallExprLValue(cast(e)); + case Expr::ExprWithCleanupsClass: { +const auto *cleanups = cast(e); +LValue l

[libunwind] [libunwind] Faster handling of frames with missed FDE records. (PR #167849)

2025-11-14 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > @kovdan01 , @atrosinenko - saw you in reviewers of one recent PR-s, touching > this file. Could you either review, or redirect to appropriate reviewers for > this change? Thank you in advance! @ldionne Could you please take a look at the changes and/or assign appropriate rev

[clang] [X86][Clang] Allow SSE/AVX COMI/UCOMI/CMPS/CMPP fp comparison intrinsics to be used in constexpr (PR #160876)

2025-11-14 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @zeyi2 sorry I missed this - will take a look when I can - cheers https://github.com/llvm/llvm-project/pull/160876 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [OpenMP][Offload] Add offload runtime support for dyn_groupprivate clause (PR #152831)

2025-11-14 Thread Alex Duran via cfe-commits
https://github.com/adurang edited https://github.com/llvm/llvm-project/pull/152831 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] build TypeLoc for CountAttributedType (PR #167287)

2025-11-14 Thread Aaron Ballman via cfe-commits
@@ -19,6 +19,7 @@ #include "clang/AST/NestedNameSpecifierBase.h" #include "clang/AST/TemplateBase.h" #include "clang/AST/TypeBase.h" +#include "clang/Basic/IdentifierTable.h" AaronBallman wrote: Why do we need this include? https://github.com/llvm/llvm-projec

[clang] [X86][clang-cl] Add AVX10.1/2 to CL option /arch (PR #167111)

2025-11-14 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem edited https://github.com/llvm/llvm-project/pull/167111 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][docs][NFC] Enforce 80 characters limit (4/4) (PR #168049)

2025-11-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: mitchell (zeyi2) Changes Fix documentation in `mpi`, `objc`, `openmp`, `performance`, `portability`, `readability` and `zircon`. This is part of the codebase cleanup described in https://github.com/llvm/llvm-project/issues/16

[clang] [Clang] Introduce malloc_span attribute (PR #167010)

2025-11-14 Thread Aleksandr Nogikh via cfe-commits
@@ -1839,6 +1839,41 @@ static void handleRestrictAttr(Sema &S, Decl *D, const ParsedAttr &AL) { RestrictAttr(S.Context, AL, DeallocE, DeallocPtrIdx)); } +static bool isSpanLikeType(const QualType &Ty) { a-nogikh wrote: Renamed to `checkSpanL

[clang] [CIR] X86 vector fcmp-sse vector builtins (PR #167125)

2025-11-14 Thread via cfe-commits
https://github.com/woruyu updated https://github.com/llvm/llvm-project/pull/167125 >From 7357dc60c17d55f5d0ecffdd958e23e8bc677240 Mon Sep 17 00:00:00 2001 From: liuzhenya Date: Thu, 13 Nov 2025 21:47:38 -1000 Subject: [PATCH] [CIR] X84 vector fcmp-sse vector builtins --- .../CIR/Dialect/Build

[clang] [LifetimeSafety] Detect use-after-return (PR #165370)

2025-11-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 commented: Looks great. Some comments on the unit test. https://github.com/llvm/llvm-project/pull/165370 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Matrix] Add a row\col major toggle in the clang driver (PR #167628)

2025-11-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/167628 fixes #167621 - define the new options in `Options.td` limit the naming to row-major or column-major. - In `ToolChains/Clang.cpp` limit the opt usage to only when `-fenable-matrix` is used. - make sure we set

[clang] Clang: Remove `-Wperf-constraint-implies-noexcept` from `-Wall`. (PR #167540)

2025-11-14 Thread via cfe-commits
@@ -350,6 +350,8 @@ Improvements to Clang's diagnostics Moved the warning for a missing (though implied) attribute on a redeclaration into this group. Added a new warning in this group for the case where the attribute is missing/implicit on an override of a virtual meth

[clang] [LifetimeSafety] Detect use-after-return (PR #165370)

2025-11-14 Thread Utkarsh Saxena via cfe-commits
@@ -1202,5 +1284,198 @@ TEST_F(LifetimeAnalysisTest, LivenessOutsideLoop) { EXPECT_THAT(Origins({"p"}), MaybeLiveAt("p1")); } +TEST_F(LifetimeAnalysisTest, SimpleReturnStackAddress) { + SetupTest(R"( +MyObj* target() { + MyObj s; + MyObj* p = &s; + POINT(

[clang] [Matrix] Add a row\col major toggle in the clang driver (PR #167628)

2025-11-14 Thread Nathan Corbyn via cfe-commits
cofibrant wrote: I've thought about this some more and I'll summarise my understanding. AFAIU, there are two separate concerns here: 1. The layout of matrices types in memory; 2. The layout used by LLVM when lowering matrix intrinsics. As far as the matrix intrinsics are concerned, at least as

[clang] 513232f - [clang][deps] Track VFS overlay files in file dependencies. (#167824)

2025-11-14 Thread via cfe-commits
Author: Volodymyr Sapsai Date: 2025-11-13T14:51:16-08:00 New Revision: 513232fb33569b054ec9763ffb512d5253f2f259 URL: https://github.com/llvm/llvm-project/commit/513232fb33569b054ec9763ffb512d5253f2f259 DIFF: https://github.com/llvm/llvm-project/commit/513232fb33569b054ec9763ffb512d5253f2f259.di

[clang] [Clang] Introduce malloc_span attribute (PR #167010)

2025-11-14 Thread Erich Keane via cfe-commits
@@ -5247,6 +5247,21 @@ yet implemented in clang. }]; } +def MallocSpanDocs : Documentation { + let Category = DocCatFunction; + let Heading = "malloc_span"; + let Content = [{ +The ``malloc_span`` attribute can be used to mark that a function which acts +like a system mem

[clang] [Headers][X86] Allow AVX512 masked arithmetic ss/sd intrinsics to be used in constexpr (PR #162816)

2025-11-14 Thread via cfe-commits
https://github.com/woruyu updated https://github.com/llvm/llvm-project/pull/162816 >From 2c79c10fde8c8d55d36a5649c0b15818d490e13b Mon Sep 17 00:00:00 2001 From: liuzhenya Date: Fri, 14 Nov 2025 04:05:06 -1000 Subject: [PATCH 1/4] [Headers][X86] Allow AVX512 masked arithmetic ss/sd intrinsics t

[clang] [WebAssembly] Enable musttail only when tail-call is enabled (PR #163618)

2025-11-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/163618 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][AIX] Add pthreads and perfstat libraries for linking static libomp.a (PR #167706)

2025-11-14 Thread David Tenty via cfe-commits
@@ -325,10 +327,13 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, // Already diagnosed. break; } + +CmdArgs.push_back("-lperfstat"); daltenty wrote: Yeah, this is going to add it for the dynamic link

[clang] [llvm] [clang][DebugInfo] Add virtual call-site target information in DWARF. (PR #167666)

2025-11-14 Thread Carlos Alberto Enciso via cfe-commits
CarlosAlbertoEnciso wrote: > Anyway, I didn't want your request to go unanswered, but I don't actually > know that much about the code that this patch touches. My main question was > why it was conditional on a particular debugger but that's been addressed. Thanks for your reply. The patch has

[clang] Adding support for iterator in motion clauses. (PR #159112)

2025-11-14 Thread via cfe-commits
@@ -4699,19 +4699,35 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, break; Data.MotionModifiers.push_back(Modifier); Data.MotionModifiersLoc.push_back(Tok.getLocation()); - ConsumeToken(); - if (Modifier == OMPC_MOTION_MODIFIER_mapp

[clang] [LifetimeSafety] Detect use-after-return (PR #165370)

2025-11-14 Thread Utkarsh Saxena via cfe-commits
@@ -122,6 +122,39 @@ class LifetimeTestHelper { return LID; } + std::optional getLiveLoansAtPoint(ProgramPoint P) const { +const auto &LiveOriginsAnalysis = Runner.getAnalysis().getLiveOrigins(); +const auto &LoanPropagation = Runner.getAnalysis().getLoanPropaga

[clang] [Clang] [C++26] Implement P1306R5 Expansion Statements (PR #165195)

2025-11-14 Thread via cfe-commits
@@ -524,6 +525,354 @@ class CoreturnStmt : public Stmt { } }; +/// CXXExpansionStmt - Base class for an unexpanded C++ expansion statement. +class CXXExpansionStmt : public Stmt { + friend class ASTStmtReader; + + ExpansionStmtDecl *ParentDecl; + SourceLocation ForLoc; +

[clang] [CIR] Upstream handling for C++ default argument l-values (PR #167999)

2025-11-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/167999 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits