[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,162 @@ +// EntryPointStats.h - Tracking statistics per entry point --*- C++ -*-// steakhal wrote: The line length seems odd. It's much smaller than 81 characters. Same observation goes at the end of this comment block. https://github.com/llvm/llvm-pro

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Optimize Cache Insertion with try_emplace for Reduced Lookups (PR #131402)

2025-03-15 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 fbf0276b6a7a7a4508c373cf87fc349569652659 28f6d8b6677e32f45f5fa55c7c73df5a841d7127 --e

[clang] [NFC][Static Analyzer] Rename and discuss about `NotNullConstraint` & `NotNullBufferConstraint` (PR #131374)

2025-03-15 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 dafb566710cd03b7fbb4b187a91f32be9452fd8c fdc265eeca36dc877f56389d8dba39b517e6 --e

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This adds support for the cir.unary operation. --- Patch is 40.74 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/131369.diff 11 Files Affected: - (modified)

[clang] [clang][modules] Fix filesystem races in `ModuleManager` (PR #131354)

2025-03-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/131354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -92,6 +92,222 @@ class ScalarExprEmitter : public StmtVisitor { mlir::Value VisitCastExpr(CastExpr *E); + // Unary Operators. + mlir::Value VisitUnaryPostDec(const UnaryOperator *e) { +LValue lv = cgf.emitLValue(e->getSubExpr()); +return emitScalarPrePostIncDe

[clang] Move const qualification of array to its elements (PR #131366)

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Serge Pavlov (spavloff) Changes Const-qualification of an array caused by constexpr specifier can produce QualType, where the const qualifier is set both as fast qualifier and as a qualifier of the array element type. It can result in a c

[clang] Remove redundant assertion & fix ClearStatName error (PR #130667)

2025-03-15 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 created https://github.com/llvm/llvm-project/pull/130667 Issue: Calling clearStatName() on an error object The function clearStatName() is called inside constructors before checking whether MaybeStat contains an error. If MaybeStat is an error, calling copyW

[clang] [clang][dataflow] Add test for crash repro and clean up const accessor handling (PR #129930)

2025-03-15 Thread Jan Voung via cfe-commits
https://github.com/jvoung commented: Thanks! https://github.com/llvm/llvm-project/pull/129930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Framework for multipart checkers (PR #130985)

2025-03-15 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/130985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-15 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `polly-x86_64-linux-plugin` running on `polly-x86_64-gce1` while building `llvm` at step 5 "build". Full details are available at: https://lab.llvm.org/buildbot/#/builders/158/builds/6973 Here is the relevant piece of the bui

[clang] [Clang codegen][PPC] Produce AIX-specific "target features" only for AIX (PR #130864)

2025-03-15 Thread zhijian lin via cfe-commits
@@ -609,13 +609,15 @@ bool PPCTargetInfo::initFeatureMap( // Privileged instructions are off by default. Features["privileged"] = false; - // The code generated by the -maix-small-local-[exec|dynamic]-tls option is - // turned off by default. - Features["aix-small-local

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-15 Thread Younan Zhang via cfe-commits
@@ -5218,16 +5218,28 @@ static bool EvaluateVarDecl(EvalInfo &Info, const VarDecl *VD) { return true; } +static bool EvaluateDecompositionDeclInit(EvalInfo &Info, + const DecompositionDecl *DD); + static bool EvaluateDecl(EvalInfo &

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 01/10] [analyzer] Introduce per-entry-point statistics MIME-

[clang] [NFC][Static Analyzer] Rename and discuss about `NotNullConstraint` & `NotNullBufferConstraint` (PR #131374)

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ziqing Luo (ziqingluo-90) Changes NotNullConstraint is used to check both null and non-null of a pointer. So the name, which was created originally for just checking non-nullness, becomes less

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-03-15 Thread Jack Styles via cfe-commits
@@ -85,6 +85,9 @@ Changes to the AMDGPU Backend Changes to the ARM Backend -- +* The `+nosimd` attribute is now fully supported. Previously, this had no effect when being used with +AArch32 targets, however this will now disable NEON instructions being

[clang] 9ecb0f5 - [Clang][diagnostics] Improve the diagnostics for chained comparisons (#129285)

2025-03-15 Thread via cfe-commits
Author: Amr Hesham Date: 2025-03-06T18:55:18+01:00 New Revision: 9ecb0f58ebb4faa2410dd8ee1fe4d2187aa3fbfc URL: https://github.com/llvm/llvm-project/commit/9ecb0f58ebb4faa2410dd8ee1fe4d2187aa3fbfc DIFF: https://github.com/llvm/llvm-project/commit/9ecb0f58ebb4faa2410dd8ee1fe4d2187aa3fbfc.diff LO

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-15 Thread via cfe-commits
@@ -11,6 +11,9 @@ add_clang_library(clangCIRFrontendAction DEPENDS MLIRCIROpsIncGen MLIRCIROpInterfacesIncGen + # Add mlir-generic-headers dependency as the header CIRGenAction.h needs to + # include BuiltinOps.h + mlir-generic-headers darkbuck wrote:

[clang] [Feature]: merge host and kernel dependencies for heterogeneous compilation (PR #119513)

2025-03-15 Thread via cfe-commits
https://github.com/zhouronghua updated https://github.com/llvm/llvm-project/pull/119513 >From a93c012998c02abfe57c00c98ec20501a3641520 Mon Sep 17 00:00:00 2001 From: "ronghua.zhou" Date: Fri, 14 Feb 2025 01:04:51 + Subject: [PATCH] [Feature]: support for the BC library file into the compile

[clang] [llvm] [analysis] Software Bill of Mitigations (PR #130103)

2025-03-15 Thread Matthew Levy via cfe-commits
https://github.com/matthewlevy97 created https://github.com/llvm/llvm-project/pull/130103 The goal of this stack is to provide a metric to audit the deployed mitigations in a binary and where they are enabled at function level granularity. This will enable tracking of where we do and don't hav

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-03-15 Thread Pierre van Houtryve via cfe-commits
Pierre-vh wrote: I'll get it tested internally ASAP. I wasn't confident in the driver changes so I was waiting for more feedback before doing it I'll update once I get results https://github.com/llvm/llvm-project/pull/128509 ___ cfe-commits mailing li

[clang] 431eaa8 - [HLSL] make semantic matching case insensitive (#129773)

2025-03-15 Thread via cfe-commits
Author: Sarah Spall Date: 2025-03-10T11:19:45-07:00 New Revision: 431eaa8deb4ea1cbe079a29126f9559e4716f00d URL: https://github.com/llvm/llvm-project/commit/431eaa8deb4ea1cbe079a29126f9559e4716f00d DIFF: https://github.com/llvm/llvm-project/commit/431eaa8deb4ea1cbe079a29126f9559e4716f00d.diff L

[clang] [HLSL] select scalar overloads for vector conditions (PR #129396)

2025-03-15 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/129396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/130989 This PR abstracts the `LockFileManager` API into new `AdvisoryLock` interface. This is so that we can create an alternative implementation for Clang implicitly-built modules that is optimized for single-pr

[clang] [Clang] Fix immediate escalation of template function specializations. (PR #124404)

2025-03-15 Thread Michael Buch via cfe-commits
Michael137 wrote: FYI, this is causing the LLDB `image dump ast` command to infinitely recurse when we have template functions in the AST. Not really super urgent because it's not a command most people use, and the root cause is probably due to the way LLDB constructs its AST. But thought I'd

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-15 Thread Younan Zhang via cfe-commits
@@ -5218,16 +5218,28 @@ static bool EvaluateVarDecl(EvalInfo &Info, const VarDecl *VD) { return true; } +static bool EvaluateDecompositionDeclInit(EvalInfo &Info, + const DecompositionDecl *DD); + static bool EvaluateDecl(EvalInfo &

[clang] [sanitizer][CFI] Add support to build CFI with sanitize-coverage (PR #131296)

2025-03-15 Thread Maxim Zhukov via cfe-commits
Mephistophiles wrote: Hi @vitalybuka! Should I wait @kstoimenov approval? https://github.com/llvm/llvm-project/pull/131296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Remove 'libomptarget.devicertl.a' fatbinary and use static library (PR #126143)

2025-03-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/126143 >From 326befb8bdaafe1a2954b7aa956d26f1ec8c187f Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 6 Feb 2025 15:54:19 -0600 Subject: [PATCH] [OpenMP] Remove 'libomptarget.devicertl.a' fatbinary and use stat

[clang] 39cf545 - [HLSL][Driver] Use temporary files correctly (#130436)

2025-03-15 Thread via cfe-commits
Author: Chris B Date: 2025-03-10T10:13:33-05:00 New Revision: 39cf545756b358d02d9b828e5c51ebcb8ed6d19e URL: https://github.com/llvm/llvm-project/commit/39cf545756b358d02d9b828e5c51ebcb8ed6d19e DIFF: https://github.com/llvm/llvm-project/commit/39cf545756b358d02d9b828e5c51ebcb8ed6d19e.diff LOG:

[clang] [alpha.webkit.UncountedCallArgsChecker] Treat an explicit construction of Ref from a Ref return value safe. (PR #130911)

2025-03-15 Thread Ryosuke Niwa via cfe-commits
@@ -70,6 +70,8 @@ bool tryToFindPtrOrigin( if (isCtorOfSafePtr(ConversionFunc)) return callback(E, true); } +if (isa(E) && isSafePtrType(cast->getType())) + return callback(E, true); rniwa wrote: We typically don'

[clang] [HLSL] Make sure `isSigned` flag is set on target type for `TypedBuffer` resources with signed int vectors (PR #130223)

2025-03-15 Thread Helena Kotas via cfe-commits
@@ -59,8 +59,14 @@ llvm::Type *DirectXTargetCodeGenInfo::getHLSLType( SmallVector Ints = {/*IsWriteable*/ ResAttrs.ResourceClass == llvm::dxil::ResourceClass::UAV, /*IsROV*/ ResAttrs.IsROV}; -

[clang] [llvm] [VectorCombine] Shrink loads used in shufflevector rebroadcasts (PR #128938)

2025-03-15 Thread Leon Clark via cfe-commits
https://github.com/PeddleSpam updated https://github.com/llvm/llvm-project/pull/128938 >From f1c09277af268256fce71df9a858959b69385ef1 Mon Sep 17 00:00:00 2001 From: Leon Clark Date: Wed, 26 Feb 2025 15:59:02 + Subject: [PATCH 1/6] [AggressiveInstCombine] Shrink loads used in shufflevector

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -688,6 +695,36 @@ AnalysisConsumer::getModeForDecl(Decl *D, AnalysisMode Mode) { return Mode; } +template +static clang::Decl *preferDefinitionImpl(clang::Decl *D) { + if (auto *X = dyn_cast(D)) +if (auto *Def = X->getDefinition()) + return Def; + return D; +

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-03-15 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/128952 >From 656d6e87466bfc85246f7abaedfe6549e566717b Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 26 Feb 2025 14:37:06 -0800 Subject: [PATCH 1/7] error on out of bounds vector accesses --- .../clang/Basic/Dia

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-15 Thread Morris Hafner via cfe-commits
@@ -78,6 +78,111 @@ class LLVMLoweringInfo { class CIR_Op traits = []> : Op, LLVMLoweringInfo; +//===--===// +// CastOp +//===--===// + +

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-15 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 1/9] add

[clang] [alpha.webkit.UncountedCallArgsChecker] Fix a false negative when a call argument is a local variable. (PR #129974)

2025-03-15 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: On hindsight, the existing code is correct. We're lying on local variable checker to check the liveness of a local variable. Call arguments checker was just relying on that. https://github.com/llvm/llvm-project/pull/129974 ___ cfe-commit

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

2025-03-15 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `bolt-x86_64-ubuntu-clang` running on `bolt-worker` while building `llvm` at step 5 "build-clang-bolt". Full details are available at: https://lab.llvm.org/buildbot/#/builders/113/builds/6279 Here is the relevant piece of the

[clang] c84d8e8 - [clang][modules] Introduce new `ModuleCache` interface (#131193)

2025-03-15 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-03-14T11:32:39-07:00 New Revision: c84d8e8f1c406ab34d56efd4a9f8c5fbce70af2d URL: https://github.com/llvm/llvm-project/commit/c84d8e8f1c406ab34d56efd4a9f8c5fbce70af2d DIFF: https://github.com/llvm/llvm-project/commit/c84d8e8f1c406ab34d56efd4a9f8c5fbce70af2d.diff L

[clang] [C2y] Implement WG14 N3411 (PR #130180)

2025-03-15 Thread Aaron Ballman via cfe-commits
@@ -3192,23 +3192,22 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { if (CurPtr != BufferStart && (CurPtr[-1] != '\n' && CurPtr[-1] != '\r')) { DiagnosticsEngine &Diags = PP->getDiagnostics(); SourceLocation EndLoc = getSourceLocation(BufferEnd); -

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 01/11] [analyzer] Introduce per-entry-point statistics MIME-

[clang] [OffloadBundler] Expose function to parse compressed bundle headers (PR #130284)

2025-03-15 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/130284 From 27adc9ef08bf2ac98319885fb461975f37a98bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Fri, 7 Mar 2025 12:29:31 +0100 Subject: [PATCH 1/2] [OffloadBundler] Expo

[clang] [clang] Avoid doing C++20 aggregate init during copy-initialization (PR #131320)

2025-03-15 Thread via cfe-commits
@@ -6714,7 +6714,8 @@ void InitializationSequence::InitializeFrom(Sema &S, OverloadCandidateSet::iterator Best; OverloadingResult OR = getFailedCandidateSet().BestViableFunction( S, Kind.getLocation(), Best); -if (OR != OverloadingResult::OR_

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -0,0 +1,77 @@ +//===--===// +// +// 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: Apac

[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -9242,3 +9242,15 @@ Declares that a function potentially allocates heap memory, and prevents any pot of ``nonallocating`` by the compiler. }]; } + +def ValueTypeDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``value_type`` attribute can be u

[clang] [clang][bytecode] Fix builtin_memcmp buffer sizes for pointers (PR #130570)

2025-03-15 Thread Timm Baeder via cfe-commits
@@ -0,0 +1,120 @@ +// RUN: %clang_cc1 -std=c++2c -fexperimental-new-constant-interpreter -verify=expected,both %s +// RUN: %clang_cc1 -std=c++2c -verify=ref,both %s + +// both-no-diagnostics + +namespace std { +inline namespace { tbaederr wrote: Just a reduced

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-15 Thread Morris Hafner via cfe-commits
@@ -568,6 +568,128 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMUnaryOpLowering::matchAndRewrite( +cir::UnaryOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) const { +

[clang] [llvm] [Support] Return `LockFileManager` errors right away (PR #130627)

2025-03-15 Thread Ben Langmuir via cfe-commits
@@ -248,39 +236,14 @@ LockFileManager::LockFileManager(StringRef FileName) // There is a lock file that nobody owns; try to clean it up and get // ownership. -if ((EC = sys::fs::remove(LockFileName))) { - std::string S("failed to remove lockfile "); - S.a

[clang] [llvm] Reapply "Use global TimerGroups for both new pass manager and old pass manager timers" (#131173) (PR #131217)

2025-03-15 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 edited https://github.com/llvm/llvm-project/pull/131217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix segmentation fault caused by `VarBypassDetector` stack overflow on deeply nested expressions (PR #124128)

2025-03-15 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb edited https://github.com/llvm/llvm-project/pull/124128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC]clean ConstCorrectnessCheck (PR #130493)

2025-03-15 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/130493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analysis] Software Bill of Mitigations (PR #130103)

2025-03-15 Thread Matthew Levy via cfe-commits
https://github.com/matthewlevy97 updated https://github.com/llvm/llvm-project/pull/130103 >From fb04b7bf5f2b668bf354632fc53e7521f44880c9 Mon Sep 17 00:00:00 2001 From: Matt Levy Date: Wed, 5 Mar 2025 12:36:02 -0500 Subject: [PATCH 1/5] [clang][CodeGen] Software Bill of Mitigations Metadata The

[clang] [AstMatcher]`templateArgumentCountIs` support `FunctionDecl` (PR #130416)

2025-03-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/130416 >From b28bd17fd58c6f41b3d860cb490cdbfeef8b8c3e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 8 Mar 2025 21:33:02 +0800 Subject: [PATCH] [AstMatcher]`templateArgumentCountIs` support `FunctionDecl`

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-03-15 Thread Jonathan Thackray via cfe-commits
@@ -85,6 +85,9 @@ Changes to the AMDGPU Backend Changes to the ARM Backend -- +* The `+nosimd` attribute is now fully supported. Previously, this had no effect when being used with +AArch32 targets, however will now disable NEON instructions being gene

[clang] [Clang] Treat `ext_vector_type` as a regular type attribute (PR #130177)

2025-03-15 Thread Erich Keane via cfe-commits
https://github.com/erichkeane requested changes to this pull request. https://github.com/llvm/llvm-project/pull/130177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-03-15 Thread David Green via cfe-commits
@@ -334,8 +334,8 @@ ARM_CPU_NAME("cortex-r7", ARMV7R, FK_VFPV3_D16_FP16, false, (ARM::AEK_MP | ARM::AEK_HWDIVARM)) ARM_CPU_NAME("cortex-r8", ARMV7R, FK_VFPV3_D16_FP16, false, (ARM::AEK_MP | ARM::AEK_HWDIVARM)) -ARM_CPU_NAME("cortex-r52", ARMV8R, FK_NEO

[clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2025-03-15 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman requested changes to this pull request. Thanks for the fix! Looks good besides some minor nits. https://github.com/llvm/llvm-project/pull/82061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [Clang] [Tests] Add some more tests around non-local/non-variable declarations in C for loops (PR #131199)

2025-03-15 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/131199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][modules] Introduce new `ModuleCache` interface (PR #131193)

2025-03-15 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang-tools-extra,clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/12940 Here is the relevant pi

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -468,6 +468,55 @@ def BrOp : CIR_Op<"br", }]; } +//===--===// +// UnaryOp +//===--===// + +def UnaryOpKind_Inc : I32EnumAttrCase<"Inc"

[clang] [clang-format] Fix a bug in wrapping function return type (PR #129374)

2025-03-15 Thread Owen Pan via cfe-commits
@@ -5091,8 +5091,10 @@ UnwrappedLineParser::parseMacroCall() { void UnwrappedLineParser::pushToken(FormatToken *Tok) { Line->Tokens.push_back(UnwrappedLineNode(Tok)); if (MustBreakBeforeNextToken) { owenca wrote: I renamed it to [`AtEndOfPPLine`](https://

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -3524,14 +3524,16 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { QualType PointeeType; /// The class of which the pointee is a member. Must ultimately be a - /// RecordType, but could be a typedef or a template parameter too. - const Type *Cl

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-15 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,392 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -Wno-unused-value -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -Wno-unused-value -emit-llvm %s -o %t-cir.ll +// RUN

[clang] [sanitizer][CFI] Add support to build CFI with sanitize-coverage (PR #131296)

2025-03-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/131296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)

2025-03-15 Thread Florian Hahn via cfe-commits
fhahn wrote: Just rebased the PR and > > I feel like this is a property that needs to propagate through types > > You mean, similar to the way trivial_abi works? That makes sense. I am not sure about propagating. I added some documentation to make the spec of the attribute clearer. Specific

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-03-15 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: > Hi, I think this broke two of our buildbots -- for reasons I don't quite > understand, but reverting fixed the issue locally. Can you please take a look > at it? > > https://lab.llvm.org/buildbot/#/builders/10/builds/980 > https://lab.llvm.org/buildbot/#/builders/73/builds/143

[clang] [clang] Fix darwin-related tests' REQUIRES annotation (PR #130138)

2025-03-15 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm commented: I've done as much of the review as I can. The syntax in the `REQUIRES` lines looks sensible to me, and I see why _most_ of these tests would depend on clang being configured to target its host Darwin platform by default: * `apple-arm64-arch.c`, `compila

[clang] Warn about virtual methods in `final` classes (PR #131188)

2025-03-15 Thread Hans Wennborg via cfe-commits
zmodem wrote: > What do you think about implementing the suggestion about checking if virtual > methods actually get overridden or not? Since we could only do it for classes with internal linkage, I think it's probably not very valuable. Warning about virtual functions that are not overriding

[clang] [alpha.webkit.UncountedCallArgsChecker] os_log functions should be treated as safe. (PR #131500)

2025-03-15 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/131500 …os_log functions should be treated as safe in call arguments checkers. Also treat __builtin_* functions and __libcpp_verbose_abort functions as "trivial" for the purpose in call argument checkers. >From 38660de

[clang] Skip more WebKit checker tests on targets where builtin is not supported. (PR #131501)

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/131501.diff 2 Files Affected: - (modified) clang/test/Analysis/Checkers/WebKit/retain-ptr-ctor-adopt-use-arc.mm (+1) - (modified) clang/test/Analys

[clang] Skip more WebKit checker tests on targets where builtin is not supported. (PR #131501)

2025-03-15 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/131501 None >From a03593710d4c39b484490573d257162742c83ca1 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sat, 15 Mar 2025 23:11:03 -0700 Subject: [PATCH] Skip more WebKit checker tests on targets where builtin is n

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-03-15 Thread Tristan Ross via cfe-commits
RossComputerGuy wrote: Alright, if it does fix it then we should get this moving so libc pre-commits working with UEFI isn't blocked. https://github.com/llvm/llvm-project/pull/127290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] 0689d23 - [C++20][Modules] Prevent premature calls to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (#129982)

2025-03-15 Thread via cfe-commits
Author: Michael Park Date: 2025-03-15T23:03:20-07:00 New Revision: 0689d23ab3089eb9920b8f5caa92e423fe3475f8 URL: https://github.com/llvm/llvm-project/commit/0689d23ab3089eb9920b8f5caa92e423fe3475f8 DIFF: https://github.com/llvm/llvm-project/commit/0689d23ab3089eb9920b8f5caa92e423fe3475f8.diff

[clang] [C++20][Modules] Prevent premature calls to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-15 Thread Michael Park via cfe-commits
https://github.com/mpark closed https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f4043f4 - Skip more WebKit checker tests on targets where builtin is not supported. (#131501)

2025-03-15 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-03-15T23:39:30-07:00 New Revision: f4043f451d0e8c30c8a9826ce87a6e76f3ace468 URL: https://github.com/llvm/llvm-project/commit/f4043f451d0e8c30c8a9826ce87a6e76f3ace468 DIFF: https://github.com/llvm/llvm-project/commit/f4043f451d0e8c30c8a9826ce87a6e76f3ace468.diff

[clang] Skip more WebKit checker tests on targets where builtin is not supported. (PR #131501)

2025-03-15 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/131501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] os_log functions should be treated as safe. (PR #131500)

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes …os_log functions should be treated as safe in call arguments checkers. Also treat __builtin_* functions and __libcpp_verbose_abort functions as "trivial" for the purpose in call argument checkers. --- Full d

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-03-15 Thread via cfe-commits
Prabhuk wrote: > Would this unblock #131376? I believe it will. @petrhosek can you PTAL? https://github.com/llvm/llvm-project/pull/127290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-15 Thread via cfe-commits
stmuench wrote: > Release notes entry missing. > > Now, to be honest I do not like idea behind those changes. Simply because if > diagnostic is raised for example for an surrogate type, there is no way to > apply fixes, and as this check is "modernize", main purpose of it is to apply > fixes.

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-15 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/131369 This adds support for the cir.unary operation. >From d51bb762224f70b2b879198e2466ca0d258f9eae Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 10 Mar 2025 15:07:50 -0700 Subject: [PATCH] [CIR] Upstream

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-15 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/131057 >From 255050e6d1e3ebbf25b30c17a10be14d29e5dae7 Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Tue, 4 Mar 2025 12:47:24 -0500 Subject: [PATCH] [clang][CIR] Add missing dependency on MLIR headers - Add depend

[clang] [clang] Fix inaccurate wording of warn_second_arg_of_va_start_not_last_named_param (PR #131238)

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

[clang] [clang][docs] Reflect the implementation status for P2280R4 (PR #127166)

2025-03-15 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: Oh, there seem to be a few remaning bugs. Now I've added some FIXME comments to the most related test files. @Endilll https://github.com/llvm/llvm-project/pull/127166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] cbbcc3d - [C2y] Claim conformance to WG14 N3460 (#131196)

2025-03-15 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-03-14T12:37:07-04:00 New Revision: cbbcc3d13b7747be4587e36ddc0699587ff31904 URL: https://github.com/llvm/llvm-project/commit/cbbcc3d13b7747be4587e36ddc0699587ff31904 DIFF: https://github.com/llvm/llvm-project/commit/cbbcc3d13b7747be4587e36ddc0699587ff31904.diff

[clang] Warn about virtual methods in `final` classes (PR #131188)

2025-03-15 Thread Devon Loehr via cfe-commits
DKLoehr wrote: Changed to not warn on `virtual...override`. I'm inclined to agree that it doesn't seem worth the effort to extend this to things that aren't actually overridden in practice. https://github.com/llvm/llvm-project/pull/131188 ___ cfe-com

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -468,6 +468,55 @@ def BrOp : CIR_Op<"br", }]; } +//===--===// +// UnaryOp +//===--===// + +def UnaryOpKind_Inc : I32EnumAttrCase<"Inc"

[clang] f3effc2 - [C2y] Claim conformance to N3347

2025-03-15 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-03-06T16:21:40-05:00 New Revision: f3effc24004a99c6167680a66b1f95bde3c268f4 URL: https://github.com/llvm/llvm-project/commit/f3effc24004a99c6167680a66b1f95bde3c268f4 DIFF: https://github.com/llvm/llvm-project/commit/f3effc24004a99c6167680a66b1f95bde3c268f4.diff

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-15 Thread Craig Topper via cfe-commits
@@ -0,0 +1,90 @@ +//===-- RISCVInstrInfoZclsd.td -*- 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: Apa

[clang] [Clang][NFC] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)

2025-03-15 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/131346 >From 6ecbeba21b4d9e2309b0468a90387e7c890ce109 Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Fri, 14 Mar 2025 17:58:07 +0200 Subject: [PATCH] [Clang] Rename SecondArgIsLastNamedArgument for clarity and consistenc

[clang] [clang] Add builtins for `add` with `nuw` and/or `nsw` (PR #130354)

2025-03-15 Thread via cfe-commits
@@ -5037,6 +5037,66 @@ def ArithmeticFence : LangBuiltin<"ALL_LANGUAGES"> { let Prototype = "void(...)"; } +class SNUWTemplate : macurtis-amd wrote: I didn't see any infrastructure to handle the varying return type. How would I express that the return type

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -0,0 +1,392 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -Wno-unused-value -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -Wno-unused-value -emit-llvm %s -o %t-cir.ll +// RUN

[clang] Warn about virtual methods in `final` classes (PR #131188)

2025-03-15 Thread Devon Loehr via cfe-commits
https://github.com/DKLoehr updated https://github.com/llvm/llvm-project/pull/131188 >From fbd474fb5ae3adeaf1644a4d44e916e4d7c66395 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Thu, 13 Mar 2025 17:34:27 + Subject: [PATCH 1/6] Initial warning commit --- clang/include/clang/Basic/Diagnos

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

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

[clang-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-15 Thread Denis Mikhailov via cfe-commits
denzor200 wrote: LGTM, please provide the change for one comment I left https://github.com/llvm/llvm-project/pull/130297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not emit nodiscard warnings for the base expr of static member access (PR #131450)

2025-03-15 Thread via cfe-commits
cor3ntin wrote: /cherry-pick 9a1e390 https://github.com/llvm/llvm-project/pull/131450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not emit nodiscard warnings for the base expr of static member access (PR #131450)

2025-03-15 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#131474 https://github.com/llvm/llvm-project/pull/131450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9a1e390 - [Clang] Do not emit nodiscard warnings for the base expr of static member access (#131450)

2025-03-15 Thread via cfe-commits
Author: cor3ntin Date: 2025-03-15T22:27:08+01:00 New Revision: 9a1e39062b2ab445f1f4424ecdc5ffb46e8cb9e0 URL: https://github.com/llvm/llvm-project/commit/9a1e39062b2ab445f1f4424ecdc5ffb46e8cb9e0 DIFF: https://github.com/llvm/llvm-project/commit/9a1e39062b2ab445f1f4424ecdc5ffb46e8cb9e0.diff LOG:

[clang-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-15 Thread Denis Mikhailov via cfe-commits
https://github.com/denzor200 approved this pull request. https://github.com/llvm/llvm-project/pull/130297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >