[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/91364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-07-10 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: The reproducer turned out to be pretty simple: ```C++ export module a; module :private; static void f() {} void g() { f(); } ``` Compiles without that patch, otherwise produces: ``` error: no matching function for call to 'f' ``` > Oh, sorry, I took another look at the

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread John McCall via cfe-commits
@@ -1886,6 +1896,29 @@ llvm::Constant *ConstantEmitter::emitForMemory(CodeGenModule , return Res; } + if (destType->isBitIntType()) { +if (CGM.getTypes().typeRequiresSplitIntoByteArray(destType, C->getType())) { + // Long _BitInt has array of bytes as

[clang] [C2y] Add documentation to conform to WG14 N3262; NFC (PR #98146)

2024-07-10 Thread John McCall via cfe-commits
rjmccall wrote: Oh, I completely spaced on this before, but of course there *are* constraints on `va_list` in the standard: `va_list`s are passed by value to functions like `vprintf`. That, of course, requires the value to be primitively copied. If you call `vprintf(format, args)`, the

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s -verify -fno-builtin -Werror=comment -Wno-error=abi -Wfatal-errors=assume -Wno-fatal-errors=assume + +#define diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) + +template +void diagnose_if_wcomma() diagnose_if(b, "oh no",

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-10 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/98267 >From 2ca4c255338f1c41a2cad929604c70febf6c7eaf Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 9 Jul 2024 19:47:27 -0700 Subject: [PATCH 1/5] [llvm][AArch64] apple-m4 is armv9.2-a But since SVE and

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: You could also mention in documentation of option that those issues are detected by compiler warning: `-Winteger-overflow` https://github.com/llvm/llvm-project/pull/98352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] fix sema init crashing on initialization sequences (PR #98102)

2024-07-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for the fix! https://github.com/llvm/llvm-project/pull/98102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Remove Linux path names in ROCm search paths on Windows (PR #97668)

2024-07-10 Thread David Salinas via cfe-commits
david-salinas wrote: > > Compiler messages on HIP SDK for Windows > > Please rewrite this to say what the patch does or what problem it fixes. Changed the PR (and commit) subject to something more meaningful/accurate. https://github.com/llvm/llvm-project/pull/97668

[clang] Remove Linux path names in ROCm search paths on Windows (PR #97668)

2024-07-10 Thread David Salinas via cfe-commits
@@ -0,0 +1,7 @@ +// UNSUPPORTED: system-linux david-salinas wrote: changed to REQUIRES: system-windows in latest patch https://github.com/llvm/llvm-project/pull/97668 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Piotr Zegar via cfe-commits
@@ -45,6 +45,12 @@ Options should header be suggested, or . Defaults to ``true``. +.. option:: IgnoreConstantIntExpr + + If the multiplication operands are compile-time constants (like literals or + are ``constexpr``) and fit within the source expression

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/98352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Piotr Zegar via cfe-commits
@@ -84,6 +86,19 @@ void ImplicitWideningOfMultiplicationResultCheck::handleImplicitCastExpr( if (TgtWidth <= SrcWidth) return; + // Is the expression a compile-time constexpr that we know can fit in the + // source type? + if (IgnoreConstantIntExpr &&

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,81 @@ +// RUN: %check_clang_tidy -check-suffixes=ALL,NI %s bugprone-implicit-widening-of-multiplication-result %t -- -- -target x86_64-unknown-unknown -x c++ PiotrZSL wrote: i have feeling that this test isn't needed here at all, and second would be

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,81 @@ +// RUN: %check_clang_tidy -check-suffixes=ALL,NI %s bugprone-implicit-widening-of-multiplication-result %t -- -- -target x86_64-unknown-unknown -x c++ +// RUN: %check_clang_tidy -check-suffixes=ALL %s bugprone-implicit-widening-of-multiplication-result %t --

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Missing release notes entry about added new config options for check. https://github.com/llvm/llvm-project/pull/98352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [lldb] [llvm] [llvm][TargetParser] Return StringMap from getHostCPUFeatures (PR #97824)

2024-07-10 Thread Craig Topper via cfe-commits
@@ -20,16 +20,15 @@ using namespace llvm; int main(int argc, char **argv) { #if defined(__i386__) || defined(_M_IX86) || \ defined(__x86_64__) || defined(_M_X64) - StringMap features; - - if (!sys::getHostCPUFeatures(features)) + const StringMap features =

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-10 Thread Vitaly Goldshteyn via cfe-commits
@@ -483,6 +483,12 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`unnecessary-value-param goldvitaly wrote:

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-10 Thread Vitaly Goldshteyn via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + //

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-10 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly updated https://github.com/llvm/llvm-project/pull/97767 >From 1cf4340d7302e075a8785f23fd383db29cedd590 Mon Sep 17 00:00:00 2001 From: %username% <%userna...@google.com> Date: Thu, 4 Jul 2024 22:32:19 +0200 Subject: [PATCH 1/7] Allow unnecessary-value-param to match

[clang] [lldb] [llvm] [llvm][TargetParser] Return StringMap from getHostCPUFeatures (PR #97824)

2024-07-10 Thread Alex Langford via cfe-commits
https://github.com/bulbazord approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/97824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly enable the f16 type for offloading (PR #98331)

2024-07-10 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/98331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add flag to opt out of wasm-opt (PR #95208)

2024-07-10 Thread Sam Clegg via cfe-commits
sbc100 wrote: I think should never not be running wasm-opt when the linker is wasm-component-ld. Thats not going to work, at least not any time soon. How to integrate wasm-opt into wasm-component-ld is a good question. I imagine @alexcrichton has some ideas in that area.

[clang] 196ee23 - [Clang] Correctly enable the f16 type for offloading (#98331)

2024-07-10 Thread via cfe-commits
Author: Joseph Huber Date: 2024-07-10T12:56:54-05:00 New Revision: 196ee230fdc9ab90dacfeb846c794f5d0c9d1e0c URL: https://github.com/llvm/llvm-project/commit/196ee230fdc9ab90dacfeb846c794f5d0c9d1e0c DIFF: https://github.com/llvm/llvm-project/commit/196ee230fdc9ab90dacfeb846c794f5d0c9d1e0c.diff

[clang] [Clang] Correctly enable the f16 type for offloading (PR #98331)

2024-07-10 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,117 @@ +// REQUIRES: nvptx-registered-target +// +// RUN: %clang_cc1 -ffp-contract=off -triple nvptx-unknown-unknown -target-cpu \ +// RUN: sm_86 -target-feature +ptx72 -fcuda-is-device -x cuda -emit-llvm -o - %s \ jhuber6 wrote: They're probably

[clang] [Clang] Correctly enable the f16 type for offloading (PR #98331)

2024-07-10 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,117 @@ +// REQUIRES: nvptx-registered-target +// +// RUN: %clang_cc1 -ffp-contract=off -triple nvptx-unknown-unknown -target-cpu \ +// RUN: sm_86 -target-feature +ptx72 -fcuda-is-device -x cuda -emit-llvm -o - %s \ arsenm wrote: I assume you don't

[clang] [Clang] Correctly enable the f16 type for offloading (PR #98331)

2024-07-10 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/98331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly enable the f16 type for offloading (PR #98331)

2024-07-10 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/98331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -1774,6 +1774,18 @@ llvm::Constant *ConstantEmitter::emitForMemory(CodeGenModule , return Res; } + if (const auto *BIT = destType->getAs()) { +if (BIT->getNumBits() > 128) { + // Long _BitInt has array of bytes as in-memory type. +

[clang] Add -static-libasan alias for -static-libsan. (PR #98194)

2024-07-10 Thread Evgenii Stepanov via cfe-commits
https://github.com/eugenis closed https://github.com/llvm/llvm-project/pull/98194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] dcf70e1 - Add -static-libasan alias for -static-libsan. (#98194)

2024-07-10 Thread via cfe-commits
Author: Evgenii Stepanov Date: 2024-07-10T10:23:17-07:00 New Revision: dcf70e16684420ae211dad58dbfacc0430409ab4 URL: https://github.com/llvm/llvm-project/commit/dcf70e16684420ae211dad58dbfacc0430409ab4 DIFF:

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -2093,17 +2107,10 @@ void CodeGenFunction::EmitStoreOfScalar(llvm::Value *Value, Address Addr, llvm::Type *SrcTy = Value->getType(); if (const auto *ClangVecTy = Ty->getAs()) { auto *VecTy = dyn_cast(SrcTy); -if (VecTy && ClangVecTy->isExtVectorBoolType()) { -

[clang] Add -static-libasan alias for -static-libsan. (PR #98194)

2024-07-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/98194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -118,6 +124,37 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T, bool ForBitField) { return R; } +bool CodeGenTypes::LLVMTypeLayoutMatchesAST(QualType ASTTy, +llvm::Type *LLVMTy) { + CharUnits ASTSize =

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -609,9 +609,25 @@ bool ConstStructBuilder::AppendBytes(CharUnits FieldOffsetInChars, return Builder.add(InitCst, StartOffset + FieldOffsetInChars, AllowOverwrite); } -bool ConstStructBuilder::AppendBitField( -const FieldDecl *Field, uint64_t FieldOffset,

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -1886,6 +1896,29 @@ llvm::Constant *ConstantEmitter::emitForMemory(CodeGenModule , return Res; } + if (destType->isBitIntType()) { +if (CGM.getTypes().typeRequiresSplitIntoByteArray(destType, C->getType())) { + // Long _BitInt has array of bytes as

[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread Mariya Podchishchaeva via cfe-commits
@@ -1,12 +1,25 @@ -// RUN: %clang_cc1 -triple x86_64-gnu-linux -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK64 -// RUN: %clang_cc1 -triple x86_64-windows-pc -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Chris Warner via cfe-commits
cwarner-8702 wrote: @AaronBallman @njames93 Could you review? https://github.com/llvm/llvm-project/pull/98352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-10 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/98267 >From 2ca4c255338f1c41a2cad929604c70febf6c7eaf Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 9 Jul 2024 19:47:27 -0700 Subject: [PATCH 1/5] [llvm][AArch64] apple-m4 is armv9.2-a But since SVE and

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Chris Warner (cwarner-8702) Changes Add an option to the `bugprone-implicit-widening-of-multiplication-result` clang-tidy checker to suppress warnings when the expression is made up of all compile-time constants (literals,

[clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Chris Warner via cfe-commits
https://github.com/cwarner-8702 created https://github.com/llvm/llvm-project/pull/98352 Add an option to the `bugprone-implicit-widening-of-multiplication-result` clang-tidy checker to suppress warnings when the expression is made up of all compile-time constants (literals, `constexpr` values

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-10 Thread Constantin Kronbichler via cfe-commits
ccrownhill wrote: I added three more tests covering these points: — part of the operand of a sizeof operator whose result is an integer constant; — part of the controlling expression of a generic selection; — or, part of the operand of any typeof operator whose result is not a variably modified

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-10 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/98267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-10 Thread Jon Roelofs via cfe-commits
@@ -797,7 +797,7 @@ def HasV8_9aOps : Architecture64<8, 9, "a", "v8.9a", !listconcat(HasV8_8aOps.DefaultExts, [FeatureSPECRES2, FeatureCSSC, FeatureRASv2])>; def HasV9_0aOps : Architecture64<9, 0, "a", "v9a", - [HasV8_5aOps, FeatureMEC], jroelofs wrote:

[clang] [llvm] [llvm][AArch64] apple-m4 is armv9.2-a (PR #98267)

2024-07-10 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/98267 >From 2ca4c255338f1c41a2cad929604c70febf6c7eaf Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 9 Jul 2024 19:47:27 -0700 Subject: [PATCH 1/4] [llvm][AArch64] apple-m4 is armv9.2-a But since SVE and

[clang] [AST] Replace localUncachedLookup with noload_lookup in ASTImporterFixtures (NFC) (PR #91955)

2024-07-10 Thread via cfe-commits
https://github.com/AtariDreams closed https://github.com/llvm/llvm-project/pull/91955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix bug that undefined internal is a warning only for -pedantic-errors (PR #98016)

2024-07-10 Thread Constantin Kronbichler via cfe-commits
https://github.com/ccrownhill updated https://github.com/llvm/llvm-project/pull/98016 >From 5dd2bb12dee26ba93d927ad1cd99fa610f9ace97 Mon Sep 17 00:00:00 2001 From: ccrownhill Date: Mon, 8 Jul 2024 11:42:37 +0100 Subject: [PATCH 1/3] fix bug that undefined internal is a warning only for

[clang] [CodeGen] Update test intrinsic to support immediates (PR #79174)

2024-07-10 Thread via cfe-commits
https://github.com/AtariDreams closed https://github.com/llvm/llvm-project/pull/79174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LoongArch][clang] Add support for option `-msimd=` and macro `__loongarch_simd_width`. (PR #97984)

2024-07-10 Thread Jake Egan via cfe-commits
jakeegan wrote: Hi, this test is failing on the AIX bot https://lab.llvm.org/buildbot/#/builders/64/builds/250/steps/6/logs/FAIL__Clang__loongarch-msimd_c The reason is that -o is not a supported option with grep on AIX. Would you be able to adapt the test to avoid piping (so that the builtin

[clang] [clang] Ensure pointers passed to runtime support functions are correctly signed (PR #98276)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes Updates codegen for global destructors and raising exceptions to ensure that the function pointers being passed are signed using the correct schema. Notably this requires that

[clang] [clang] Ensure pointers passed to runtime support functions are correctly signed (PR #98276)

2024-07-10 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt ready_for_review https://github.com/llvm/llvm-project/pull/98276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Ensure pointers passed to runtime support functions are correctly signed (PR #98276)

2024-07-10 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/98276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix sema init crashing on initialization sequences (PR #98102)

2024-07-10 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: > The changes LGTM, but please add a release note to > clang/docs/ReleaseNotes.rst so users know about the fix. Added. Thanks. https://github.com/llvm/llvm-project/pull/98102 ___ cfe-commits mailing list

[clang] [clang] fix sema init crashing on initialization sequences (PR #98102)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/98102 >From 097881dcd14d44e97e526de86dc348e7a4e5a2e6 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Mon, 8 Jul 2024 18:16:17 -0700 Subject: [PATCH 1/2] [clang] fix sema init crash for not checking a

[clang] [clang] fix sema init crashing on initialization sequences (PR #98102)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/98102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix sema init crashing on initialization sequences (PR #98102)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/98102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC][CodeGen] Assume a for-in loop is in bounds and cannot overflow (PR #94885)

2024-07-10 Thread via cfe-commits
AtariDreams wrote: @JOE1994 Could you please merge this, as I do not have merge permissions? https://github.com/llvm/llvm-project/pull/94885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [RISCV] Add QingKe "XW" compressed opcode extension (PR #97925)

2024-07-10 Thread via cfe-commits
ArcaneNibble wrote: Pre-commit CI is now green on Windows, Linux has been waiting for a free builder for several hours now Do I need to do anything else here? I do not have commit access to merge this myself. https://github.com/llvm/llvm-project/pull/97925

[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)

2024-07-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot1` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/1294 Here is the relevant piece of the

[clang] [llvm] [RISCV] Add ability to list extensions enabled for a target (PR #98207)

2024-07-10 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/98207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] let UseAfterMoveFinder::find() return an optional (PR #98100)

2024-07-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/98100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 77ec20c - [clang-tidy] let UseAfterMoveFinder::find() return an optional (#98100)

2024-07-10 Thread via cfe-commits
Author: Kefu Chai Date: 2024-07-10T18:19:42+02:00 New Revision: 77ec20c2fcfe1578bd62258cc5e185236d2abf81 URL: https://github.com/llvm/llvm-project/commit/77ec20c2fcfe1578bd62258cc5e185236d2abf81 DIFF: https://github.com/llvm/llvm-project/commit/77ec20c2fcfe1578bd62258cc5e185236d2abf81.diff

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s -verify -fno-builtin -Werror=comment -Wno-error=abi -Wfatal-errors=assume -Wno-fatal-errors=assume + +#define diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) + +template +void diagnose_if_wcomma() diagnose_if(b, "oh no",

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/70976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 commented: > Sorry for the delay in review! No worries! I dropped this for a few months myself. I can't expect to get a review within days when doing that :D > This seems like the right direction to go, in general. As @erichkeane, it's a > bit hard to review due

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Gábor Horváth (Xazax-hun) Changes On Darwin, -print-libgcc-file-name was returning a nonsensical result. It would return the name of the library that would be used by the default toolchain

[clang] [clang][driver] Fix -print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/98325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/98325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -356,6 +363,12 @@ class LLVM_LIBRARY_VISIBILITY Darwin : public MachO { void addProfileRTLibs(const llvm::opt::ArgList , llvm::opt::ArgStringList ) const override; + // Return the full path of the compiler-rt library on a Darwin MachO system. +

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -223,6 +223,11 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain { // There aren't any profiling libs for embedded targets currently. } + // Return the full path of the compiler-rt library on a Darwin MachO system. + // Those are under

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -223,6 +223,13 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain { // There aren't any profiling libs for embedded targets currently. } + // Return the full path of the compiler-rt library on a non-Darwin MachO + // system. Those are under + //

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -1303,18 +1288,55 @@ void MachO::AddLinkRuntimeLib(const ArgList , ArgStringList , // rpaths. This is currently true from this place, but we need to be // careful if this function is ever called before user's rpaths are emitted. if (Opts & RLO_AddRPath) { -

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,97 @@ +// Test the output of -print-libgcc-file-name on Darwin. ldionne wrote: It looks like the embedded targets are already tested to some extent inside `clang/test/Driver/darwin-embedded.c`. I would add a new test file

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,97 @@ +// Test the output of -print-libgcc-file-name on Darwin. + +// +// All platforms +// + +// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \ +// RUN: --target=x86_64-apple-macos \ +// RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \ +// RUN: |

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,97 @@ +// Test the output of -print-libgcc-file-name on Darwin. + +// +// All platforms +// + +// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name \ +// RUN: --target=x86_64-apple-macos \ +// RUN: -resource-dir=%S/Inputs/resource_dir 2>&1 \ +// RUN: |

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
@@ -2230,6 +2239,7 @@ bool Driver::HandleImmediateArgs(const Compilation ) { } if (C.getArgs().hasArg(options::OPT_print_runtime_dir)) { +initDarwinTarget(); ldionne wrote: We should also add tests for this behavior. We were not printing the right

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. https://github.com/llvm/llvm-project/pull/98325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix --print-libgcc-file-name on Darwin platforms (PR #98325)

2024-07-10 Thread Louis Dionne via cfe-commits
https://github.com/ldionne ready_for_review https://github.com/llvm/llvm-project/pull/98325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-07-10 Thread Jamie Schmeiser via cfe-commits
https://github.com/jamieschmeiser closed https://github.com/llvm/llvm-project/pull/87626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0fa20c5 - demangle function names in trace files (#87626)

2024-07-10 Thread via cfe-commits
Author: Trass3r Date: 2024-07-10T12:14:28-04:00 New Revision: 0fa20c55b58deb94090985a5c5ffda4d5ceb3cd1 URL: https://github.com/llvm/llvm-project/commit/0fa20c55b58deb94090985a5c5ffda4d5ceb3cd1 DIFF: https://github.com/llvm/llvm-project/commit/0fa20c55b58deb94090985a5c5ffda4d5ceb3cd1.diff LOG:

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-07-10 Thread via cfe-commits
https://github.com/earnol edited https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)

2024-07-10 Thread Daniel Kiss via cfe-commits
https://github.com/DanielKristofKiss updated https://github.com/llvm/llvm-project/pull/98329 >From b1e113f76b289aa8a7d4459314a0dbffb313cb51 Mon Sep 17 00:00:00 2001 From: Daniel Kiss Date: Wed, 10 Jul 2024 16:23:11 +0200 Subject: [PATCH 1/2] [NFC][Clang] Move functions of BranchProtectionInfo

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/4] Add an option to add source file info to -ftime-trace ---

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-07-10 Thread via cfe-commits
https://github.com/earnol edited https://github.com/llvm/llvm-project/pull/96240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-07-10 Thread via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang -Wno-constant-conversion -Wno-array-bounds -Wno-division-by-zero -Wno-shift-negative-value -Wno-shift-count-negative -Wno-int-to-pointer-cast -O0

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-07-10 Thread Ameer J via cfe-commits
@@ -146,6 +146,14 @@ static bool startsNextParameter(const FormatToken , Style.BreakInheritanceList != FormatStyle::BILS_BeforeComma)); } +// Returns \c true if \c Current starts a new operand in a binary operation. ameerj wrote: The wording was

[clang] [clang-format] Add BinPackBinaryOperations configuration (PR #95013)

2024-07-10 Thread Ameer J via cfe-commits
https://github.com/ameerj updated https://github.com/llvm/llvm-project/pull/95013 >From a50f3d4395efd09eea8ba2e750bb785857f9a550 Mon Sep 17 00:00:00 2001 From: ameerj Date: Mon, 10 Jun 2024 12:09:40 -0400 Subject: [PATCH 01/11] Add BinPackBinaryOperations ---

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/98320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/3] Add an option to add source file info to -ftime-trace ---

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 24d5c54cf52d38e63d365275f913285908aa9c9a...ae991f8c88c21a0872a5fa63219b3cb9b2787d9a

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/98320.diff 3 Files Affected: - (modified) clang/lib/Sema/SemaTemplateInstantiate.cpp (+1) - (modified)

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Utkarsh Saxena (usx95) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/98320.diff 3 Files Affected: - (modified) clang/lib/Sema/SemaTemplateInstantiate.cpp (+1) - (modified)

[clang] [analyzer] Split TaintPropagation checker into reporting and modeling checkers (PR #98157)

2024-07-10 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp closed https://github.com/llvm/llvm-project/pull/98157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6002e2f - [analyzer] Split TaintPropagation checker into reporting and modeling checkers (#98157)

2024-07-10 Thread via cfe-commits
Author: Daniel Krupp Date: 2024-07-10T17:54:53+02:00 New Revision: 6002e2fd49537e942e819e5d1e6f07481fd1229e URL: https://github.com/llvm/llvm-project/commit/6002e2fd49537e942e819e5d1e6f07481fd1229e DIFF: https://github.com/llvm/llvm-project/commit/6002e2fd49537e942e819e5d1e6f07481fd1229e.diff

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/98320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

2024-07-10 Thread via cfe-commits
cor3ntin wrote: Is this still relevant? What about #85613 ? I think we can close both, right? https://github.com/llvm/llvm-project/pull/86960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Add source file name for template instantiations in -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/98320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Split TaintPropagation checker into reporting and modeling checkers (PR #98157)

2024-07-10 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/98157 >From 75675417c324a2d1df5e42a8549f6d4bcb779ab4 Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Fri, 5 Jul 2024 14:02:00 +0200 Subject: [PATCH 1/5] [analyzer] Splitting TaintPropagation checker into reporting

[clang] Add an option to add source file info to -ftime-trace (PR #98320)

2024-07-10 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/98320 >From 03cc5fbebaf0c0c737e9304b8b3310ab4908fcaa Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 10 Jul 2024 13:52:46 + Subject: [PATCH 1/2] Add an option to add source file info to -ftime-trace ---

[clang] [clang-tools-extra] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)

2024-07-10 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %clang_cc1 %s -verify -fno-builtin -Werror=comment -Wno-error=abi -Wfatal-errors=assume -Wno-fatal-errors=assume + +#define diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) + +template +void diagnose_if_wcomma() diagnose_if(b, "oh no",

  1   2   3   4   5   6   7   8   9   10   >