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

2025-03-12 Thread Ayush Pareek via cfe-commits
@@ -93,7 +93,7 @@ class CachedFileSystemEntry { getDirectiveTokens() const { assert(!isError() && "error"); assert(!isDirectory() && "not a file"); -assert(Contents && "contents not initialized"); +// Since isError() and isDirectory() imply that Contents is nu

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
Megan0704-1 wrote: Thanks for your feedback and review!! I’ve updated the changelog and the test file to include the rvalue-to-lvalue case and templated constructor scenario. Please let me know if there’s anything else! https://github.com/llvm/llvm-project/pull/130866 _

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

2025-03-12 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 updated https://github.com/llvm/llvm-project/pull/130667 >From 94b213ad0edf8295451cdb315093cd73923714bb Mon Sep 17 00:00:00 2001 From: Ayush Pareek Date: Tue, 11 Mar 2025 02:23:49 +0530 Subject: [PATCH 1/2] Update DependencyScanningFilesystem.h Issue: Calling

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

2025-03-12 Thread Ayush Pareek via cfe-commits
@@ -126,7 +126,8 @@ class CachedFileSystemEntry { private: void clearStatName() { -if (MaybeStat) + +if (MaybeStat && MaybeStat->getName().empty()) //If MaybeStat is an error, calling copyWithNewName() can cause undefined behavior ayushparee

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-12 Thread Djordje Todorovic via cfe-commits
@@ -238,13 +238,10 @@ def ImplP5600 : SubtargetFeature<"p5600", "ProcImpl", "MipsSubtarget::CPU::P5600", "The P5600 Processor", [FeatureMips32r5]>; +// I6500 is multicluster version of I6400. Both are based on s

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
Megan0704-1 wrote: Thank you for reviewing and approving the PR! Yes, please merge it for me. Thanks again for all your help! https://github.com/llvm/llvm-project/pull/130866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/130866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks for working on this Can you add a changelog entry in clang/docs/ReleaseNotes.rst (in the bug fixes to c++ section)? Thanks https://github.com/llvm/llvm-project/pull/130866 ___ cfe-commits mailing list c

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/130909 After #129868 went in, I realize some updates have been made to the Triple. Not sure if @nikic overlooked including this change in his PR (hence I have having build issue when compiling clang against emscrip

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Anutosh Bhat (anutosh491) Changes After #129868 went in, I realize some updates have been made to the Triple. Not sure if @nikic overlooked including this change in his PR (hence I have having build issue when compiling clang against ems

[clang] [HLSL][NFC] Update HLSL AST tests to be more readable (PR #130910)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/130910 Replacing all occurences of - `0x{{[0-9A-Fa-f]+}} <> ` - `0x{{[0-9A-Fa-f]+}} <>` - `0x{{[0-9A-Fa-f]+}}` - `0x{{[0-9a-fA-F]+}} ` - `0x{{[0-9a-fA-F]+}} col:#` with - `{{.*}}` to improve readability and concisenes

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 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 90a08fb4b7e79e79121a563ac9cd8138cfedeb3c ca6163e2e4cf1d0a7e3ba60feb28ede52dcd4f8d --e

[clang] c9563a4 - [Clang][NFC] Remove CallExpr::CreateTemporary (#130919)

2025-03-12 Thread via cfe-commits
Author: cor3ntin Date: 2025-03-12T09:49:24+01:00 New Revision: c9563a422cea44f0b00fdcd5085666442f8f24f8 URL: https://github.com/llvm/llvm-project/commit/c9563a422cea44f0b00fdcd5085666442f8f24f8 DIFF: https://github.com/llvm/llvm-project/commit/c9563a422cea44f0b00fdcd5085666442f8f24f8.diff LOG:

[clang] [Clang][NFC] Remove CallExpr::CreateTemporary (PR #130919)

2025-03-12 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/130919 ___ 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-12 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 commented: Thanks for the comments @davemgreen. I need to do some more investigation here as I think there is more going wrong than I initially thought after this change is introduced. https://github.com/llvm/llvm-project/pull/130623 ___

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
https://github.com/Megan0704-1 updated https://github.com/llvm/llvm-project/pull/130866 >From 80e764fcfa1912e9d3771f4edb354569741010b7 Mon Sep 17 00:00:00 2001 From: Megan Date: Tue, 11 Mar 2025 17:09:04 -0700 Subject: [PATCH 1/3] [Sema] Diagnose by-value copy constructors in template instanti

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

2025-03-12 Thread Jack Styles 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] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. Thanks for fixing this issue! Will you need me to merge this for you? https://github.com/llvm/llvm-project/pull/130866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

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

2025-03-12 Thread Aniket Lal via cfe-commits
@@ -1582,6 +1582,26 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, // Implicit copy-assignment gets the same special treatment as implicit // copy-constructors. emitImplicitAssignmentOperatorBody(Args); + } else if (FD->hasAttr() && +

[clang] fix(clang/**.py): fix invalid escape sequences (PR #94029)

2025-03-12 Thread Balazs Benics via cfe-commits
steakhal wrote: Hi, could you explain the motivation of this patch? I'm not an expert on Python, but to me it seemed like the `r"..."` strings are supposed to be used for regular expressions, and in this change you appear to transform those strings into plain old strings. Could you help me unde

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-12 Thread via cfe-commits
https://github.com/Megan0704-1 updated https://github.com/llvm/llvm-project/pull/130866 >From 80e764fcfa1912e9d3771f4edb354569741010b7 Mon Sep 17 00:00:00 2001 From: Megan Date: Tue, 11 Mar 2025 17:09:04 -0700 Subject: [PATCH 1/3] [Sema] Diagnose by-value copy constructors in template instanti

[clang] [Clang][NFC] Remove CallExpr::CreateTemporary (PR #130919)

2025-03-12 Thread via cfe-commits
@@ -1655,14 +1645,8 @@ SourceLocation CallExpr::getBeginLoc() const { if (!isTypeDependent()) { if (const auto *Method = dyn_cast_if_present(getCalleeDecl()); -Method && Method->isExplicitObjectMemberFunction()) { - // Note: while we typically exp

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

2025-03-12 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,144 @@ +// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-capturing-this-by-field %t -- -config="{CheckOptions: {bugprone-capturing-this-by-field.FunctionWrapperTypes: '::std::function;::Fn'}}" -- + +namespace std { + +template +class function; + +template +c

[clang] fix(clang/**.py): fix invalid escape sequences (PR #94029)

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

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

2025-03-12 Thread Hans Wennborg via cfe-commits
zmodem wrote: This broke our builds. Here's a small repro: ``` $ cat /tmp/a.cc #include __m256i parens; int f() { return ((__v32qi)parens)[31]; } $ build/bin/clang -c /tmp/a.cc /tmp/a.cc:4:20: error: vector element index 31 is out of bounds 4 | return ((__v32qi)parens)[31]; |

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-12 Thread Nikita Popov via cfe-commits
@@ -116,7 +116,7 @@ body: | successors: %bb.2, %bb.4 liveins: $rdi, $rsi -%1:gr32 = COPY $rsi +%1:gr64 = COPY $rsi nikic wrote: I believe this test was previously creating a 32-bit TM by accident. https://github.com/llvm/llvm-proj

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-12 Thread Yingwei Zheng via cfe-commits
@@ -93,7 +93,7 @@ LLVMState::LLVMState(std::unique_ptr TM, std::unique_ptr LLVMState::createTargetMachine() const { return std::unique_ptr( TheTargetMachine->getTarget().createTargetMachine( - TheTargetMachine->getTargetTriple().normalize(), + Triple(T

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-12 Thread Nikita Popov via cfe-commits
@@ -93,7 +93,7 @@ LLVMState::LLVMState(std::unique_ptr TM, std::unique_ptr LLVMState::createTargetMachine() const { return std::unique_ptr( TheTargetMachine->getTarget().createTargetMachine( - TheTargetMachine->getTargetTriple().normalize(), + Triple(T

[clang] fix(clang/**.py): fix invalid escape sequences (PR #94029)

2025-03-12 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: The change in `clang/test/Analysis/check-analyzer-fixit.py` is a good step forward, it indeed fixes an invalid escape sequence[1]. However, I don't see any reason for the changes in `clang/docs/tools/dump_ast_matchers.py`: those were raw strings, so ther

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-12 Thread Mallikarjuna Gouda via cfe-commits
https://github.com/mgoudar updated https://github.com/llvm/llvm-project/pull/130587 >From 4f9c5b5b844a61b760a3462994c7736542c14ca4 Mon Sep 17 00:00:00 2001 From: Mallikarjuna Gouda Date: Mon, 10 Mar 2025 15:42:39 +0530 Subject: [PATCH 1/4] [MIPS] Add MIPS i6400 and i6500 processors The i6400 a

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

2025-03-12 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I had already done so, it's practically no change: https://llvm-compile-time-tracker.com/compare.php?from=cce9f360b50ca5a95d5cb550e27a8f6757423460&to=20841e444c0f8d48c6c9d34a77fe48164f7ae728&stat=instructions:u https://github.com/llvm/llvm-project/pull/130537 ___

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-12 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/128150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Nikita Popov (nikic) Changes This avoids doing a Triple -> std::string -> Triple round trip in lots of places, now that the Module stores a Triple. --- Patch is 51.13 KiB, truncated to 20.00 KiB below, full version: https://git

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly @llvm/pr-subscribers-backend-amdgpu Author: Nikita Popov (nikic) Changes This avoids doing a Triple -> std::string -> Triple round trip in lots of places, now that the Module stores a Triple. --- Patch is 51.13 KiB, truncated to 20

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-12 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/130940 This avoids doing a Triple -> std::string -> Triple round trip in lots of places, now that the Module stores a Triple. >From 7aa005a4e9aa14c79a527719936824bcfe9a409c Mon Sep 17 00:00:00 2001 From: Nikita Popov D

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

2025-03-12 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 edited https://github.com/llvm/llvm-project/pull/130623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix(clang/**.py): fix invalid escape sequences (PR #94029)

2025-03-12 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > to me it seemed like the `r"..."` strings are supposed to be used for regular > expressions, and in this change you appear to transform those strings into > plain old strings. Could you help me understand this? In Python the `r` string prefix stands for a _raw_ string litera

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-12 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 553da9634dc4bae215e6c850d2de3186d09f9da5 7aa005a4e9aa14c79a527719936824bcfe9a409c --e

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-12 Thread Matt Arsenault via cfe-commits
@@ -453,14 +453,14 @@ class Target { /// either the target triple from the module, or the target triple of the /// host if that does not exist. TargetMachine *createTargetMachine( - StringRef TT, StringRef CPU, StringRef Features, arsenm wrote: Can

[clang] [llvm] [not for merge][RFC] Key Instructions front end demo (PR #130943)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo @llvm/pr-subscribers-clang Author: Orlando Cazalet-Hyams (OCHyams) Changes This draft pull request demonstrates our proposed approach to annotating instructions with Key Instructions metadata. It's not fully complete but works as a proof of c

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-12 Thread A. Jiang via cfe-commits
@@ -107,6 +107,8 @@ def err_ice_too_large : Error< "integer constant expression evaluates to value %0 that cannot be " "represented in a %1-bit %select{signed|unsigned}2 integer type">; def err_expr_not_string_literal : Error<"expression is not a string literal">; +def note

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 >From bd1b0b2a14afeb73755db3a7deb6bffd4f50778c Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 17 Feb 2025 15:33:20 +0530 Subject: [PATCH 1/2] Fix error recovery while PTU cleanup --- clang/lib/Interpr

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-12 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-03-12 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From 2c9e6e45944891af54cba9648297a996bb4d8cca Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 14:03:35 +0800 Subject: [PATCH 1/3] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-co

[clang] [CIR] Don't generate ClangIR after an unrecoverable error occured (PR #130971)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Morris Hafner (mmha) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/130971.diff 1 Files Affected: - (modified) clang/lib/CIR/CodeGen/CIRGenerator.cpp (+2) ``diff diff --git a/clang/lib/CIR/CodeGen/CIRGenera

[clang] [NFC][analyzer] Rename `CheckerBase::getCheckerName` to `getName` (PR #130953)

2025-03-12 Thread Balazs Benics via cfe-commits
@@ -41,19 +41,19 @@ class BugType { Checker(nullptr), SuppressOnSink(SuppressOnSink) {} BugType(const CheckerBase *Checker, StringRef Desc, StringRef Cat = categories::LogicError, bool SuppressOnSink = false) - : CheckerName(Checker->getCheckerName()),

[clang] [CIR] Don't generate ClangIR after an unrecoverable error occured (PR #130971)

2025-03-12 Thread Morris Hafner via cfe-commits
@@ -43,6 +43,8 @@ void CIRGenerator::Initialize(ASTContext &astContext) { mlir::ModuleOp CIRGenerator::getModule() const { return cgm->getModule(); } bool CIRGenerator::HandleTopLevelDecl(DeclGroupRef group) { + if (diags.hasUnrecoverableErrorOccurred()) +return true; ---

[clang] [CIR] Add transform test for cir-flatten-cfg (PR #130861)

2025-03-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/130861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add transform test for cir-flatten-cfg (PR #130861)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: cir-opt %s -cir-flatten-cfg -o - | FileCheck %s + +module { + cir.func @foo() { +cir.scope { + %0 = cir.alloca !cir.int, !cir.ptr>, ["a", init] {alignment = 4 : i64} + %1 = cir.const #cir.int<4> : !cir.int + cir.store %1, %0 : !cir.in

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-03-12 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 cd043e4fbe6125df4cb4993c625fa5e46194e478 cb6a620c93b3809742fd067233844221e74dde4f --e

[clang] [CIR] Add transform test for cir-flatten-cfg (PR #130861)

2025-03-12 Thread David Olsen via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: cir-opt %s -cir-flatten-cfg -o - | FileCheck %s + +module { + cir.func @foo() { +cir.scope { + %0 = cir.alloca !cir.int, !cir.ptr>, ["a", init] {alignment = 4 : i64} + %1 = cir.const #cir.int<4> : !cir.int + cir.store %1, %0 : !cir.in

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-03-12 Thread via cfe-commits
github-actions[bot] wrote: :warning: undef deprecator found issues in your code. :warning: You can test this locally with the following command: ``bash git diff -U0 --pickaxe-regex -S '([^a-zA-Z0-9#_-]undef[^a-zA-Z0-9_-]|UndefValue::get)' cd043e4fbe6125df4cb4993c625fa5e46194e478

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-03-12 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/130973 >From 487a823a9ec35df1a93109ef03630738bdc39ab1 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 7 Mar 2025 11:54:20 + Subject: [PATCH] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -165,6 +165,33 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr *e) { return LValue(); } +/// Emit code to compute the specified expression which +/// can have any type. The result is returned as an RValue struct. +RValue CIRGenFunction::emitAnyExpr(const E

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

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

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -55,10 +55,154 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s, if (mlir::succeeded(emitSimpleStmt(s, useCurrentScope))) return mlir::success(); - // Only a subset of simple statements are supported at the moment. When more - // kinds of statements ar

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-03-12 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm created https://github.com/llvm/llvm-project/pull/130973 For function whose vscale_range is limited to a single value we can size scalable vectors. This aids SROA by allowing scalable vector load and store operations to be considered for replacement whereby bi

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130494)

2025-03-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/130494 >From 353f538f425ead9ee10ca6c046a6517b9e157db4 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 9 Mar 2025 15:43:37 + Subject: [PATCH 1/8] [clang-tidy] support pointee mutation check in misc-const

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -84,26 +96,266 @@ class ScalarExprEmitter : public StmtVisitor { } mlir::Value VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *e) { -mlir::Type type = cgf.convertType(e->getType()); +mlir::Type type = convertType(e->getType()); return builder.create(

[clang] [llvm] [RISCV] Add Qualcomn uC Xqcili (load large immediates) extension (PR #130012)

2025-03-12 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/130012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-12 Thread Mallikarjuna Gouda via cfe-commits
@@ -238,13 +238,10 @@ def ImplP5600 : SubtargetFeature<"p5600", "ProcImpl", "MipsSubtarget::CPU::P5600", "The P5600 Processor", [FeatureMips32r5]>; +// I6500 is multicluster version of I6400. Both are based on s

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -121,29 +359,159 @@ mlir::Value CIRGenFunction::emitScalarExpr(const Expr *e) { return ScalarExprEmitter(*this, builder).Visit(const_cast(e)); } +[[maybe_unused]] static bool MustVisitNullValue(const Expr *e) { + // If a null pointer expression's type is the C++0x nullp

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,20 +89,259 @@ class ScalarExprEmitter : public StmtVisitor { builder.getCIRBoolAttr(e->getValue())); } - mlir::Value VisitCastExpr(CastExpr *E); + mlir::Value VisitCastExpr(CastExpr *e); + + mlir::Value VisitExplicitCastExpr(ExplicitCastExpr *e) { +ret

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -121,29 +359,159 @@ mlir::Value CIRGenFunction::emitScalarExpr(const Expr *e) { return ScalarExprEmitter(*this, builder).Visit(const_cast(e)); } +[[maybe_unused]] static bool MustVisitNullValue(const Expr *e) { + // If a null pointer expression's type is the C++0x nullp

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -84,26 +96,266 @@ class ScalarExprEmitter : public StmtVisitor { } mlir::Value VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *e) { -mlir::Type type = cgf.convertType(e->getType()); +mlir::Type type = convertType(e->getType()); return builder.create(

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,20 +89,259 @@ class ScalarExprEmitter : public StmtVisitor { builder.getCIRBoolAttr(e->getValue())); } - mlir::Value VisitCastExpr(CastExpr *E); + mlir::Value VisitCastExpr(CastExpr *e); + + mlir::Value VisitExplicitCastExpr(ExplicitCastExpr *e) { +ret

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

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

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,20 +89,259 @@ class ScalarExprEmitter : public StmtVisitor { builder.getCIRBoolAttr(e->getValue())); } - mlir::Value VisitCastExpr(CastExpr *E); + mlir::Value VisitCastExpr(CastExpr *e); + + mlir::Value VisitExplicitCastExpr(ExplicitCastExpr *e) { +ret

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,20 +89,259 @@ class ScalarExprEmitter : public StmtVisitor { builder.getCIRBoolAttr(e->getValue())); } - mlir::Value VisitCastExpr(CastExpr *E); + mlir::Value VisitCastExpr(CastExpr *e); + + mlir::Value VisitExplicitCastExpr(ExplicitCastExpr *e) { +ret

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-12 Thread Erich Keane via cfe-commits
erichkeane wrote: > Handles #123121 > > @erichkeane Hi, I’m working on converting `select` statements to > `enum_select` in this draft PR, specifically targeting statements with 5 or > more options. I have a few questions and would appreciate some clarifications: Awesome, glad to hear it! >

[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-12 Thread Hans Wennborg via cfe-commits
zmodem wrote: We're hitting link errors after this change when building with sanitizer coverage enabled: ``` lld-link: error: relocation against symbol in discarded section: .text >>> referenced by obj/third_party/icu/icuuc_private/filteredbrk.obj:(.SCOVP$M) >>> referenced by obj/third_party/ic

[clang] [CIR] Add transform test for cir-flatten-cfg (PR #130861)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: cir-opt %s -cir-flatten-cfg -o - | FileCheck %s + +module { + cir.func @foo() { +cir.scope { + %0 = cir.alloca !cir.int, !cir.ptr>, ["a", init] {alignment = 4 : i64} + %1 = cir.const #cir.int<4> : !cir.int + cir.store %1, %0 : !cir.in

[clang] [CIR] Add transform test for cir-flatten-cfg (PR #130861)

2025-03-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I don't have concerns, but am not the best person whose approval should count here. I have questions/comments on the scope of the flatten pass (that is, what 'while we are here' type stuff it should do), but I'm again not really an aut

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-12 Thread Justin Cady via cfe-commits
https://github.com/justincady created https://github.com/llvm/llvm-project/pull/130976 Calls to __noreturn__ functions result in region termination for coverage mapping. But this creates incorrect coverage results when __noreturn__ functions (or other constructs that result in region termination

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-pgo Author: Justin Cady (justincady) Changes Calls to __noreturn__ functions result in region termination for coverage mapping. But this creates incorrect coverage results when __noreturn__ functions (or other constructs that r

[clang] [llvm] [DirectX] Remove DXILResourceMDAnalysis (PR #130323)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/130323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Avoid repeated hash lookups (NFC) (PR #130887)

2025-03-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/130887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Remove old resource annotations (PR #130338)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/130338 >From 99539251dcf58aab9a88973f9162156ae6f1aa77 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 6 Mar 2025 18:22:07 -0800 Subject: [PATCH 1/3] [HLSL][NFC] Update resource metadata tests to not use obsolete

[clang] bdbe8fa - [flang] Align `-x` language modes with `gfortran` (#130268)

2025-03-12 Thread via cfe-commits
Author: Iñaki Amatria Barral Date: 2025-03-12T16:45:33+01:00 New Revision: bdbe8fa1f3dcde77f7e0741ea7fa757ce092a420 URL: https://github.com/llvm/llvm-project/commit/bdbe8fa1f3dcde77f7e0741ea7fa757ce092a420 DIFF: https://github.com/llvm/llvm-project/commit/bdbe8fa1f3dcde77f7e0741ea7fa757ce092a42

[clang] [llvm] [HLSL] Remove old resource annotations (PR #130338)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/130338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f4d599c - [Support] Do not remove lock file on failure (#130834)

2025-03-12 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-03-12T08:51:00-07:00 New Revision: f4d599cda90aa06d1e1a95474a0ee3a4053e77dd URL: https://github.com/llvm/llvm-project/commit/f4d599cda90aa06d1e1a95474a0ee3a4053e77dd DIFF: https://github.com/llvm/llvm-project/commit/f4d599cda90aa06d1e1a95474a0ee3a4053e77dd.diff L

[clang] [llvm] [Support] Do not remove lock file on failure (PR #130834)

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

[clang] e5aac52 - [AST] Avoid repeated hash lookups (NFC) (#130887)

2025-03-12 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-03-12T08:46:48-07:00 New Revision: e5aac528fede69ecc90958fefcfa1f26b97c9e94 URL: https://github.com/llvm/llvm-project/commit/e5aac528fede69ecc90958fefcfa1f26b97c9e94 DIFF: https://github.com/llvm/llvm-project/commit/e5aac528fede69ecc90958fefcfa1f26b97c9e94.diff L

[clang] [HLSL][NFC] Update HLSL AST tests to be more readable (PR #130910)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes Replacing all occurences of - `0x{{[0-9A-Fa-f]+}} <> ` - `0x{{[0-9A-Fa-f]+}} <>` - `0x{{[0-9A-Fa-f]+}}` - `0x{{[0-9a-fA-F]+}}

[clang] [HLSL][NFC] Update HLSL AST tests to be more readable (PR #130910)

2025-03-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/130910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Don't generate ClangIR after an unrecoverable error occured (PR #130971)

2025-03-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha created https://github.com/llvm/llvm-project/pull/130971 None >From 92066054a6a14f2e16b7f2256bf730762ab5d5d6 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Wed, 12 Mar 2025 07:28:09 -0700 Subject: [PATCH] [CIR] Don't generate ClangIR after an unrecoverable error occ

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thanks for the fix! https://github.com/llvm/llvm-project/pull/129934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-12 Thread Tarun Prabhu via cfe-commits
=?utf-8?q?I=C3=B1aki?= Amatria Barral Message-ID: In-Reply-To: https://github.com/tarunprabhu approved this pull request. Thanks for all the changes :-) https://github.com/llvm/llvm-project/pull/130268 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Do we really want to maintain an equivalence with clang by keeping this in `CodeGenOptions` when it really ought to be a `TargetOption`? It looks like almost all of the handling of this option takes place in `flang`, so we probably shouldn't be bound t

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Paul Walker (paulwalker-arm) Changes For function whose vscale_range is limited to a single value we can size scalable vectors. This aids SROA by allowing scalable vector load and store operations to be considered for replacemen

[clang] [Clang] add additional tests for -Wshift-bool (PR #130339)

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

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130494)

2025-03-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/130494 >From 353f538f425ead9ee10ca6c046a6517b9e157db4 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 9 Mar 2025 15:43:37 + Subject: [PATCH 1/9] [clang-tidy] support pointee mutation check in misc-const

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Walker (paulwalker-arm) Changes For function whose vscale_range is limited to a single value we can size scalable vectors. This aids SROA by allowing scalable vector load and store operations to be considered for replacement whereby

[clang] [CIR] Upstream basic support for sizeof and alignof (PR #130847)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -148,3 +150,27 @@ mlir::Value ScalarExprEmitter::VisitCastExpr(CastExpr *ce) { } return {}; } + +/// Return the size or alignment of the type of argument of the sizeof +/// expression as an integer. +mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( +con

[clang] [NFC][analyzer] Rename `CheckerBase::getCheckerName` to `getName` (PR #130953)

2025-03-12 Thread Balazs Benics via cfe-commits
@@ -41,19 +41,19 @@ class BugType { Checker(nullptr), SuppressOnSink(SuppressOnSink) {} BugType(const CheckerBase *Checker, StringRef Desc, StringRef Cat = categories::LogicError, bool SuppressOnSink = false) - : CheckerName(Checker->getCheckerName()),

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: My concern is still not fixed, and Andy/Bruno still have comments here, so I don't believe this to be ready yet. https://github.com/llvm/llvm-project/pull/130502 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/130502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -33,6 +33,14 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("NYI: PPC double-double format for long double"); llvm_unreachable("Unsupported format for long double"); } + + bool isSized(mlir::Type ty) { +if (mlir::isa(ty)) + r

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-12 Thread via cfe-commits
@@ -158,6 +158,10 @@ Changes in existing checks ` check by matching ``constexpr`` and ``static`` values on member initialization. +- Improved :doc:`modernize-use-default-member-init + ` check by detecting + explicit casting of built-in types within member list initializa

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-12 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/130788 >From 5d3c1cc1d40b308b93cc47c78c6c3ca677f55155 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 11 Mar 2025 15:54:35 + Subject: [PATCH 1/3] [flang] Add support for -f[no-]verbose-asm This flag provides ex

  1   2   3   4   5   6   >