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

2025-03-12 Thread Tom Eccles via cfe-commits
tblah wrote: No problem. I have moved it to target options in https://github.com/llvm/llvm-project/pull/130788/commits/6f6f8670887c9eb030412a7eb720242bba2790db https://github.com/llvm/llvm-project/pull/130788 ___ cfe-commits mailing list cfe-commits@l

[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 edited https://github.com/llvm/llvm-project/pull/130788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-12 Thread Sudharsan Veeravalli via cfe-commits
@@ -588,6 +590,19 @@ let Predicates = [HasVendorXqcilo, IsRV32] in { def QC_E_SW: QCIRVInstESStore<0b110, 0b11, "qc.e.sw">; } // Predicates = [HasVendorXqcilo, IsRV32] +let Predicates = [HasVendorXqcili, IsRV32] in { +let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in

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

2025-03-12 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > Can you take a look? Thanks for reporting this. I'll take a look. https://github.com/llvm/llvm-project/pull/126240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-12 Thread Tarun Prabhu via cfe-commits
@@ -172,7 +172,8 @@ void Flang::addCodegenOptions(const ArgList &Args, options::OPT_finit_global_zero, options::OPT_fno_init_global_zero, options::OPT_ftime_report, options::OPT_ftime_report_EQ, options::OPT_funroll_loop

[clang] e11ede5 - Revert "[MS][clang] Add support for vector deleting destructors (#126240)"

2025-03-12 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2025-03-12T16:26:00+01:00 New Revision: e11ede5e90ee193dde179fe1a9ac9af718ede3db URL: https://github.com/llvm/llvm-project/commit/e11ede5e90ee193dde179fe1a9ac9af718ede3db DIFF: https://github.com/llvm/llvm-project/commit/e11ede5e90ee193dde179fe1a9ac9af718ede3db.diff

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

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 9820248e0aaaffbee87edeb6a73ced54b4e25be4 6f3557780d06d6a2b1a7f315c49a3ad533d821e5 --e

[clang] [libc] [llvm] Reapply "[AMDGPU] Use COV6 by default (#118515)" (PR #130963)

2025-03-12 Thread Joseph Huber via cfe-commits
jhuber6 wrote: The OpenMP runtime doesn't know how to handle `generic` ISAs right? https://github.com/llvm/llvm-project/pull/130963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Claim conformance to WG14 N3363 (PR #130980)

2025-03-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/130980 This paper clarifies two things: * a call to va_start must be within the body of a variadic function, * the va_list arguments must be lvalues Clang has correctly diagnosed the first point since Clang 5.

[clang] [C2y] Claim conformance to WG14 N3363 (PR #130980)

2025-03-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Posting this one to get precommit CI to validate before pushing. No functional changes are here. https://github.com/llvm/llvm-project/pull/130980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [llvm] Add support for template as type parameter (PR #127654)

2025-03-12 Thread via cfe-commits
ykhatav wrote: > > Are you suggesting that for the implementation to be considered as > > complete, both v1 and v2 should have the same type information? I.e "v1" > > type should point to 0x48 instead of 0x6d? As per my understanding based on > > the DWARF output below, the type for "trait::ty

[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,44 @@ +//===--- CapturingThisByFieldCheck.h - clang-tidy ---*- C++ -*-===// +// +// 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] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/130940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-12 Thread Denis Mikhailov via cfe-commits
https://github.com/denzor200 edited 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] Add an off-by-default warning to complain about MSVC bitfield padding (PR #117428)

2025-03-12 Thread Aaron Ballman via cfe-commits
@@ -6519,6 +6519,13 @@ def warn_signed_bitfield_enum_conversion : Warning< InGroup, DefaultIgnore; def note_change_bitfield_sign : Note< "consider making the bit-field type %select{unsigned|signed}0">; +def warn_ms_bitfield_mismatched_storage_packing : Warning< + "bit-fiel

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2025-03-12 Thread Pratyay Pande via cfe-commits
pratyay-p wrote: Hello @andykaylor , I am working on this pragma operation, with a different scenario. For example: https://godbolt.org/z/nTfYW64j4 Is it ok to merge this patch? https://github.com/llvm/llvm-project/pull/105746 ___ cfe-commits mailin

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

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

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Still missing the release note, but I think this is close to being ready. https://github.com/llvm/llvm-project/pull/116785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-12 Thread Aaron Ballman via cfe-commits
@@ -6517,8 +6517,22 @@ def warn_signed_bitfield_enum_conversion : Warning< "signed bit-field %0 needs an extra bit to represent the largest positive " "enumerators of %1">, InGroup, DefaultIgnore; +def warn_preferred_type_bitfield_too_small_for_enum : Warning< + "bit-fie

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-03-12 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,414 @@ +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fsyntax-only -verify -std=c++23 -Wno-unused-value -Wno-unused-but-set-variable +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fsyntax-only -verify=expected,bitfieldwarnings -std=c++23 -Wno-unused-valu

[clang] [clang] Introduce "binary" StringLiteral for #embed data (PR #127629)

2025-03-12 Thread Aaron Ballman via cfe-commits
@@ -1332,6 +1334,11 @@ StringLiteral::getLocationOfByte(unsigned ByteNo, const SourceManager &SM, const LangOptions &Features, const TargetInfo &Target, unsigned *StartToken, un

[clang] [libc][nfc] Include instantiations of gpuintrin.h in IR test case (PR #130956)

2025-03-12 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield created https://github.com/llvm/llvm-project/pull/130956 Regenerated existing test case with include-generated-funcs to show the lowered IR for each instantiation. >From 4ec726e4fcf5ab0b03f3942e42a4dbde1a6f43a4 Mon Sep 17 00:00:00 2001 From: Jon Chesterfield

[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 updated https://github.com/llvm/llvm-project/pull/130623 >From 7c0b94752285f2734d79e9e8d38aa20b3f7e8e61 Mon Sep 17 00:00:00 2001 From: Jack Styles Date: Fri, 7 Mar 2025 15:51:34 + Subject: [PATCH 1/6] [NFC][ARM] Split SIMD identifier away from MVE Previously, t

[clang] [libc] [llvm] Reapply "[AMDGPU] Use COV6 by default (#118515)" (PR #130963)

2025-03-12 Thread Shilei Tian via cfe-commits
shiltian wrote: > > CC @jdoerfert @ye-luo Once this is merged, ROCm 6.3 will be needed to run > > any program compiled for AMDGPU. > > Unless you pass `-mcode-object-version=5` right? Yes. https://github.com/llvm/llvm-project/pull/130963 ___ cfe-com

[clang] [Clang] emit -Wunused-variable warning for unused structured bindings without the [[maybe_unused]] attribute (PR #127061)

2025-03-12 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/127061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] emit -Wunused-variable warning for unused structured bindings without the [[maybe_unused]] attribute (PR #127061)

2025-03-12 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2c -Wunused %s + +namespace GH125810 { +struct S { + int a, b; +}; + +void t(S s) { + auto &[_, _] = s; + auto &[a1, _] = s; // expected-warning {{unused variable '[a1, _]'}} a-tarasyuk wrote:

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

2025-03-12 Thread via cfe-commits
u4f3 wrote: > It looks like there are some conflicts. Please fix them before merging. > > Also just noticed that you have been updating the same commit with the > changes requested in the reviews. Please have them as separate commits in the > future so that we can know what changed. You're ri

[clang] [libc] [llvm] Reapply "[AMDGPU] Use COV6 by default (#118515)" (PR #130963)

2025-03-12 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > CC @jdoerfert @ye-luo Once this is merged, ROCm 6.3 will be needed to run any > program compiled for AMDGPU. Unless you pass `-mcode-object-version=5` right? https://github.com/llvm/llvm-project/pull/130963 ___ cfe-commits mailing li

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

2025-03-12 Thread via cfe-commits
Author: Donát Nagy Date: 2025-03-12T14:49:00+01:00 New Revision: 72ee9b82151f17d6bd37abc501124d46c1cb63c3 URL: https://github.com/llvm/llvm-project/commit/72ee9b82151f17d6bd37abc501124d46c1cb63c3 DIFF: https://github.com/llvm/llvm-project/commit/72ee9b82151f17d6bd37abc501124d46c1cb63c3.diff LO

[clang] [libc][nfc] Include instantiations of gpuintrin.h in IR test case (PR #130956)

2025-03-12 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield closed https://github.com/llvm/llvm-project/pull/130956 ___ 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 Matt Arsenault via cfe-commits
@@ -116,7 +116,7 @@ body: | successors: %bb.2, %bb.4 liveins: $rdi, $rsi -%1:gr32 = COPY $rsi +%1:gr64 = COPY $rsi arsenm wrote: Verifier should have rejected using $rsi in the first place too https://github.com/llvm/llvm-project/

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

2025-03-12 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,37 @@ +.. title:: clang-tidy - bugprone-capturing-this-by-field + +bugprone-capturing-this-by-field + + +Finds lambda captures that capture the ``this`` pointer and store it as class +members without handle the copy and move constructors

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

2025-03-12 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: 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 72ee9b82151f17d6bd37abc501124d46c1c

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

2025-03-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/130297 >From 8ef214f6c78d710dbd9c74b06c7c637baf93e527 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 8 Mar 2025 00:03:39 +0800 Subject: [PATCH 1/7] [clang-tidy] Add new check bugprone-capture-this-by-field

[clang] [llvm] Add support for template as type parameter (PR #127654)

2025-03-12 Thread David Blaikie via cfe-commits
dwblaikie wrote: > Could you please take a look at the attached DWARF and let me know your > concerns with the implementation? Sure - I see the effect, but I still think it's probably not worthwhile due to the limited capacity, inconsistency (due to that limited expressiveness) between direct

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,24 +89,279 @@ 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
@@ -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
@@ -121,29 +375,174 @@ 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,24 +89,279 @@ 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
@@ -90,24 +89,279 @@ 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,24 +89,279 @@ 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,156 @@ 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
@@ -247,6 +280,179 @@ struct ConvertCIRToLLVMPass StringRef getArgument() const override { return "cir-flat-to-llvm"; } }; +mlir::Type CIRToLLVMCastOpLowering::convertTy(mlir::Type ty) const { + return getTypeConverter()->convertType(ty); +} + +mlir::LogicalResult CIRToLLVM

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

2025-03-12 Thread Morris Hafner via cfe-commits
@@ -121,29 +375,174 @@ 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] [llvm] [Support] Introduce new `AdvisoryLock` interface (PR #130989)

2025-03-12 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130989 >From cd0b9a8b878c4ecd929552c836f3d4665e926ef4 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 12 Mar 2025 09:37:27 -0700 Subject: [PATCH 1/2] [Support] Introduce new `AdvisoryLock` interface This PR

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

2025-03-12 Thread via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +template +struct A{ +A(); +A(A&); +A(A); // expected-error{{copy constructor must pass its first argument by reference}} +}; + +void f() { +A a = A(); // expected-note{{in instantiation of template

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

2025-03-12 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1,7 +1,9 @@ // 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 basic support for ArrayType (PR #130502)

2025-03-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 nit, else LGTM. 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] [Fuchsia] Add llc to toolchain (PR #130999)

2025-03-12 Thread Petr Hosek via cfe-commits
petrhosek wrote: Can you check the toolchain binary size increase? Is `llc` included in the `llvm` binary? https://github.com/llvm/llvm-project/pull/130999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -90,24 +89,279 @@ 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] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2025-03-12 Thread Ethan Luis McDonough via cfe-commits
@@ -152,7 +152,7 @@ INSTR_PROF_VALUE_NODE(PtrToNodeT, llvm::PointerType::getUnqual(Ctx), Next, \ #define INSTR_PROF_DATA_DEFINED #endif INSTR_PROF_RAW_HEADER(uint64_t, Magic, __llvm_profile_get_magic()) -INSTR_PROF_RAW_HEADER(uint64_t, Version, __llvm_profile_get_version()) +I

[clang] [Clang][NFCI] Remove CallExpr::CreateTemporary() (PR #130921)

2025-03-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/130921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-12 Thread Michael Kruse via cfe-commits
@@ -1345,7 +1345,16 @@ void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args, if (AsNeeded) addAsNeededOption(TC, Args, CmdArgs, /*as_needed=*/false); } -CmdArgs.push_back("-lflang_rt.runtime"); +if (TC.getTriple().isOSAIX()) { +

[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] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-12 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: This is what I would like to do more generally, not just for AIX. This PR however will break using a shared library libflang_rt.runtime.so. Ideally, we would synchronize with the compiler-rt implementation which already has many supporting functions su

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-12 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > I'd still prefer to get this right for all address-spaces, so we don't need > to revisit later. Sentinel pointer value support for non-0 address spaces is still work in progress: https://github.com/llvm/llvm-project/pull/83109 I am ok to add a helper like `Address::isConstant

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

2025-03-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/130690 >From a945e21869e5276c66ac979acd893d9bd9afe2cc Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Mon, 10 Mar 2025 16:18:34 -0700 Subject: [PATCH 1/4] [CIR] Upstream CastOp and scalar conversions This patch upstrea

[clang] 4d8070e - [C++20] [Modules] Don't add decls from other units to undefinedButUsed set

2025-03-12 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-03-13T11:02:57+08:00 New Revision: 4d8070e9560269494654bd21a2b0c342f4bdae48 URL: https://github.com/llvm/llvm-project/commit/4d8070e9560269494654bd21a2b0c342f4bdae48 DIFF: https://github.com/llvm/llvm-project/commit/4d8070e9560269494654bd21a2b0c342f4bdae48.diff LO

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

2025-03-12 Thread via cfe-commits
https://github.com/darkbuck created https://github.com/llvm/llvm-project/pull/131057 None >From 2a86c00614aed22f409c262dcb076f018e1fbbde 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 --- c

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

2025-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (darkbuck) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/131057.diff 2 Files Affected: - (modified) clang/lib/CIR/FrontendAction/CMakeLists.txt (+3) - (modified) clang/lib/FrontendTool/CMakeLists.txt (+5) ``

[clang] 4dcba5e - [alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for forward declarations (#130554)

2025-03-12 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-03-12T20:21:22-07:00 New Revision: 4dcba5e08dc9cf2e5ec3f0df682f8ecc88e815be URL: https://github.com/llvm/llvm-project/commit/4dcba5e08dc9cf2e5ec3f0df682f8ecc88e815be DIFF: https://github.com/llvm/llvm-project/commit/4dcba5e08dc9cf2e5ec3f0df682f8ecc88e815be.diff

[clang] [alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for forward declarations (PR #130554)

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

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/131003 Implements GCC's constexpr string ASM extension https://gcc.gnu.org/onlinedocs/gcc/Asm-constexprs.html >From 84508166a9784701dad659881bf75f9764e53f54 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 12

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-12 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd updated https://github.com/llvm/llvm-project/pull/130993 >From ba82162bbc75ab6838f2c1aa0ad89cfe585a578f Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 12 Mar 2025 09:52:58 -0700 Subject: [PATCH] Lex: add support for `i128` and `ui128` suffixes Microsof

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/131003 >From 84508166a9784701dad659881bf75f9764e53f54 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 12 Mar 2025 12:23:14 +0100 Subject: [PATCH 1/2] [Clang][WIP] Constant Expressions inside of gcc'asm strin

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

2025-03-12 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] ab53e1c - [C2y] Claim conformance to WG14 N3363 (#130980)

2025-03-12 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-03-12T14:38:54-04:00 New Revision: ab53e1c8e52388377ba50c05979b03a691513cfd URL: https://github.com/llvm/llvm-project/commit/ab53e1c8e52388377ba50c05979b03a691513cfd DIFF: https://github.com/llvm/llvm-project/commit/ab53e1c8e52388377ba50c05979b03a691513cfd.diff

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

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 ab22f652a4dfcaf5b6884a85e498d7ca077937ca ba82162bbc75ab6838f2c1aa0ad89cfe585a578f --e

[clang] [C2y] Claim conformance to WG14 N3363 (PR #130980)

2025-03-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/130980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -15328,6 +15338,15 @@ void Sema::PragmaStack::Act(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel,

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -8552,25 +8552,39 @@ template StmtResult TreeTransform::TransformGCCAsmStmt(GCCAsmStmt *S) { + SmallVector Constraints; SmallVector Exprs; SmallVector Names; - ExprResult AsmString; SmallVector Clobbers; bool ExprsChanged = false; + auto RebuildString

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -609,9 +632,10 @@ int GCCAsmStmt::getNamedOperand(StringRef SymbolicName) const { /// true, otherwise return false. unsigned GCCAsmStmt::AnalyzeAsmString(SmallVectorImpl&Pieces, const ASTContext &C, unsigned &DiagOffs) const { - StringRef S

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -3193,7 +3193,7 @@ class AsmStmt : public Stmt { /// getOutputConstraint - Return the constraint string for the specified /// output operand. All output constraints are known to be non-empty (either /// '=' or '+'). - StringRef getOutputConstraint(unsigned i) const;

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -8552,25 +8552,39 @@ template StmtResult TreeTransform::TransformGCCAsmStmt(GCCAsmStmt *S) { + SmallVector Constraints; SmallVector Exprs; SmallVector Names; - ExprResult AsmString; SmallVector Clobbers; bool ExprsChanged = false; + auto RebuildString

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -497,6 +497,19 @@ void StmtPrinter::VisitReturnStmt(ReturnStmt *Node) { if (Policy.IncludeNewlines) OS << NL; } +static void PrintGCCAsmString(raw_ostream &OS, Expr*E) { + if(E->getDependence()) { +OS << "<>"; +return; + } + + std::string Str = GCCAsmStmt::Extr

[clang] [Clang][counted_by] Add support for 'counted_by' on struct pointers (PR #127116)

2025-03-12 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/127116 >From b5b9b158e7e379f2d430584e3ccf519677bf27a3 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 10 Jan 2025 17:13:30 -0800 Subject: [PATCH 1/6] [Clang][counted_by] Add support for 'counted_by' on struc

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -17928,43 +17928,70 @@ std::optional Expr::tryEvaluateString(ASTContext &Ctx) const { return {}; } -bool Expr::EvaluateCharRangeAsString(std::string &Result, - const Expr *SizeExpression, - const Exp

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -17928,43 +17928,70 @@ std::optional Expr::tryEvaluateString(ASTContext &Ctx) const { return {}; } -bool Expr::EvaluateCharRangeAsString(std::string &Result, - const Expr *SizeExpression, - const Exp

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

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

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

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

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-12 Thread Jan Voung via cfe-commits
@@ -909,6 +909,12 @@ TEST(ConfigParseTest, ParsesConfiguration) { Style.AttributeMacros.clear(); CHECK_PARSE("BasedOnStyle: LLVM", AttributeMacros, std::vector{"__capability"}); + Style.AttributeMacros.clear(); jvoung wrote: Ok, done! https

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-12 Thread Jan Voung via cfe-commits
@@ -12720,6 +12735,21 @@ TEST_F(FormatTest, UnderstandsPointerQualifiersInCast) { verifyFormat(("x = (foo *" + AllQualifiers + " __my_qualifier)&v;").str(), CustomQualifier); + // Check additional attribute macros in Google style: + FormatStyle LongPointerR

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-12 Thread Jan Voung via cfe-commits
@@ -12518,6 +12521,10 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) { verifyIndependentOfContext("MACRO(A *_Nonnull a);"); verifyIndependentOfContext("MACRO(A *_Nullable a);"); verifyIndependentOfContext("MACRO(A *_Null_unspecified a);"); + verifyIndependentOfContex

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

2025-03-12 Thread Min-Yih Hsu via cfe-commits
mshockwave wrote: > @pawosm-arm - I've removed the reviewers because it is not quite ready yet. I > need to investigate the potential regressions shown by the RISCV tests. you can also turn this PR into a draft if you want https://github.com/llvm/llvm-project/pull/130973 __

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

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 84508166a9784701dad659881bf75f9764e53f54 --e

[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
paulwalker-arm wrote: @pawosm-arm - I've removed the reviewers because it is not quite ready yet. I need to investigate the potential regressions shown by the RISCV tests. https://github.com/llvm/llvm-project/pull/130973 ___ cfe-commits mailing list

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

2025-03-12 Thread Donát Nagy via cfe-commits
@@ -485,16 +485,60 @@ class Call { } // end eval namespace class CheckerBase : public ProgramPointTag { - CheckerNameRef Name; + /// A single checker class (i.e. a subclass of `CheckerBase`) can implement + /// multiple user-facing checkers that have separate names and can

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -17928,43 +17928,70 @@ std::optional Expr::tryEvaluateString(ASTContext &Ctx) const { return {}; } -bool Expr::EvaluateCharRangeAsString(std::string &Result, - const Expr *SizeExpression, - const Exp

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -17928,43 +17928,70 @@ std::optional Expr::tryEvaluateString(ASTContext &Ctx) const { return {}; } -bool Expr::EvaluateCharRangeAsString(std::string &Result, - const Expr *SizeExpression, - const Exp

[clang] [clang-format] Add support for absl nullability macros (PR #130346)

2025-03-12 Thread Jan Voung via cfe-commits
https://github.com/jvoung updated https://github.com/llvm/llvm-project/pull/130346 >From 10df1857532a6a27b0e5286e10c9f0724d6d7e1d Mon Sep 17 00:00:00 2001 From: Jan Voung Date: Fri, 7 Mar 2025 21:02:16 + Subject: [PATCH 1/6] [clang-format] Add support for absl nullability macros --- clang

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -1,7 +1,9 @@ // 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] [llvm] Reapply "[AArch64][SVE] Improve fixed-length addressing modes. (#130263)" (PR #130625)

2025-03-12 Thread Ricardo Jesus via cfe-commits
rj-jesus wrote: Thank you very much for the explanation, @paulwalker-arm - that makes a lot of sense! I'll try your suggestion tomorrow. I'll let you know how it goes. :) https://github.com/llvm/llvm-project/pull/130625 ___ cfe-commits mailing list c

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread via cfe-commits
cor3ntin wrote: @ojhunt @erichkeane @AaronBallman I'm looking for early feedback at this point. Obviously this has no tests yes This - Generalize our ability to evaluate string expression outside of static assert (which will be otherwise useful for https://www.open-std.org/jtc1/sc22/wg21/d

[clang] [Clang][WIP] Constant Expressions inside of gcc'asm strings (PR #131003)

2025-03-12 Thread Erich Keane via cfe-commits
@@ -328,20 +328,20 @@ void StmtProfiler::VisitGCCAsmStmt(const GCCAsmStmt *S) { VisitStmt(S); ID.AddBoolean(S->isVolatile()); ID.AddBoolean(S->isSimple()); - VisitStringLiteral(S->getAsmString()); + VisitExpr(S->getAsmStringExpr()); erichkeane wrote: A

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -154,6 +154,12 @@ class CIRGenFunction : public CIRGenTypeCache { const clang::LangOptions &getLangOpts() const { return cgm.getLangOpts(); } + /// Emit code to compute the specified expression which can have any type. The + /// result is returned as an RValue struct.

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

2025-03-12 Thread Erich Keane via cfe-commits
@@ -165,6 +165,34 @@ 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 Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/130869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >