[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] [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 &CGM, return Res; } + if (const auto *BIT = destType->getAs()) { +if (BIT->getNumBits() > 128) { + // Long _BitInt has array of bytes as in-memory type. + ConstantAggregat

[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] 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
@@ -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 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 r

[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] 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. https://github.co

[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] [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-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-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) { + // CHECK

[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: F

[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 = sys::getHostCP

[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 https://lists.llvm.org/cgi-bin/mailman/

[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
@@ -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
@@ -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 && ETy->isIntegerT

[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
@@ -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 typ

[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 cfe-commits@lists.llvm

[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] [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 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
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 https://

[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 friend

[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", "warnin

[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 standa

[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 &CGM, return Res; } + if (destType->isBitIntType()) { +if (CGM.getTypes().typeRequiresSplitIntoByteArray(destType, C->getType())) { + // Long _BitInt has array of bytes as in-

[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 commi

[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-tools-extra] [clang-tidy] bugprone-implicit-widening ignores const exprs that fit (PR #98352)

2024-07-10 Thread Chris Warner via cfe-commits
@@ -50,7 +50,7 @@ Options If the multiplication operands are compile-time constants (like literals or are ``constexpr``) and fit within the source expression type, do not emit a diagnostic or suggested fix. Only considers expressions where the source - expression is

[clang] [llvm] [llvm][misexpect] Update MisExpect to use provenance tracking metadata (PR #86610)

2024-07-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `llvm` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/1343 Here is the relevant piece of the build log for

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

2024-07-10 Thread John McCall via cfe-commits
https://github.com/rjmccall 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] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

2024-07-10 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: This is generally looking great, and I think it's ready to go as soon as you can finish the tests. (You said you weren't able to update all the tests — did you have questions about the remaining tests?) I did have a thought, though. Are we confident that

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

2024-07-10 Thread John McCall via cfe-commits
@@ -107,17 +107,52 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T, bool ForBitField) { return llvm::IntegerType::get(FixedVT->getContext(), BytePadded); } - // If this is a bool type, or a bit-precise integer type in a bitfield - // representation, map this

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

2024-07-10 Thread John McCall via cfe-commits
@@ -89,7 +89,7 @@ void CodeGenTypes::addRecordTypeName(const RecordDecl *RD, /// ConvertType in that it is used to convert to the memory representation for /// a type. For example, the scalar representation for _Bool is i1, but the /// memory representation is usually i8 or i3

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Alex Crichton via cfe-commits
https://github.com/alexcrichton created https://github.com/llvm/llvm-project/pull/98373 This commit adds a check that disables `wasm-opt` for the `wasm32-wasip2` target because `wasm-opt` doesn't support components at this time. This also fixes a minor issue from #95208 where if `wasm-opt` was

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

2024-07-10 Thread Alex Crichton via cfe-commits
alexcrichton wrote: I've opened https://github.com/llvm/llvm-project/pull/98373 to avoid running `wasm-opt` for the `wasm32-wasip2` target by default. It also fixes a minor issue with this PR where if `wasm-opt` were disabled it would skip running the linker entirely. https://github.com/llvm/

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex Crichton (alexcrichton) Changes This commit adds a check that disables `wasm-opt` for the `wasm32-wasip2` target because `wasm-opt` doesn't support components at this time. This also fixes a minor issue from #95208 where if `wasm-opt

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Alex Crichton (alexcrichton) Changes This commit adds a check that disables `wasm-opt` for the `wasm32-wasip2` target because `wasm-opt` doesn't support components at this time. This also fixes a minor issue from #95208 where if `w

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

2024-07-10 Thread John McCall via cfe-commits
https://github.com/rjmccall 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] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 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 6e86e11148474e4ecd49dbf0ca5dd9caddcdbd11 177fe1d4df4e9f02382c2f8f5dce9de4d935d763 --e

[clang] [HLSL] Set default DwarfVersion to 4 for HLSL. (PR #97854)

2024-07-10 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/97854 ___ 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 John McCall via cfe-commits
https://github.com/rjmccall 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] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Pavel Savara via cfe-commits
@@ -61,6 +61,10 @@ std::string wasm::Linker::getLinkerPath(const ArgList &Args) const { return ToolChain.GetProgramPath(ToolChain.getDefaultLinker()); } +static bool IsWasip2(const llvm::Triple &TargetTriple) { + return TargetTriple.getOSName() == "wasip2"; ---

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

2024-07-10 Thread John McCall via cfe-commits
rjmccall wrote: Ah right, I'd forgotten that some ABIs use that array trick to get it to pass by reference, and you're right that that makes it ill-formed to simply assign around. I like your idea of specifically making it UB to copy with `memcpy` etc and just advising that people use va_copy

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

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

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-07-10 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: > First of all I want to say that this is a really cool project, especially the > type sanitizer part. Thanks for working on this! > > > Just updated the tysan branches again. Unfortunately we aren't yet at a > > point where LLVM is `tysan` clean, there is a

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-07-10 Thread Florian Hahn via cfe-commits
@@ -392,6 +392,10 @@ Non-comprehensive list of changes in this release - ``#pragma GCC diagnostic warning "-Wfoo"`` can now downgrade ``-Werror=foo`` errors and certain default-to-error ``-W`` diagnostics to warnings. +- Clang now emits distinct type-based alias analysis tag

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/94693 >From 9f6d1cce5e6ba693e9d6bd125e19b3c653ee96dd Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH 1/2] [Clang] Introduce [[clang::coro_inplace_task]] --- clan

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-07-10 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 88e9c56990c8f892b5f14b844d1934bb8fcf092a 16437fc038ba9bc638a3e0b1efda4fb219e2bcbc --e

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Alex Crichton via cfe-commits
https://github.com/alexcrichton updated https://github.com/llvm/llvm-project/pull/98373 >From 177fe1d4df4e9f02382c2f8f5dce9de4d935d763 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 10 Jul 2024 12:18:06 -0700 Subject: [PATCH 1/3] [WebAssembly] Disable running `wasm-opt` on components

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Alex Crichton via cfe-commits
@@ -61,6 +61,10 @@ std::string wasm::Linker::getLinkerPath(const ArgList &Args) const { return ToolChain.GetProgramPath(ToolChain.getDefaultLinker()); } +static bool IsWasip2(const llvm::Triple &TargetTriple) { + return TargetTriple.getOSName() == "wasip2"; ---

[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: > Actually it's oposite. Simply when -Winteger-overflow is enabled, then > IgnoreConstantIntExpr can be set to true, to avoid duplicated warnings. For > me IgnoreConstantIntExpr should even by ON by default. Sorry, I'm still struggling to see the connection. Maybe I'm ge

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-07-10 Thread Gedare Bloom via cfe-commits
https://github.com/gedare updated https://github.com/llvm/llvm-project/pull/93140 >From 6f35c68cff7381453a0bd6a491fee1db6784f42d Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Tue, 21 May 2024 22:21:59 -0600 Subject: [PATCH 1/5] [clang-format] Improve BlockIndent at ColumnLimit Fixes #55731

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-07-10 Thread Gedare Bloom via cfe-commits
@@ -803,6 +803,60 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, return !Tok.Previous->isOneOf(TT_CastRParen, tok::kw_for, tok::kw_while, tok::kw_switch); }; + // Detecting functions is brittle. It wo

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-07-10 Thread Gedare Bloom via cfe-commits
gedare wrote: Rebased to be able to use #97938 https://github.com/llvm/llvm-project/pull/93140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] static data members of template classes should be allowed in header units (PR #98309)

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

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 approved this pull request. Can we write a test for this? https://github.com/llvm/llvm-project/pull/98373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Alex Crichton via cfe-commits
https://github.com/alexcrichton updated https://github.com/llvm/llvm-project/pull/98373 >From 177fe1d4df4e9f02382c2f8f5dce9de4d935d763 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 10 Jul 2024 12:18:06 -0700 Subject: [PATCH 1/4] [WebAssembly] Disable running `wasm-opt` on components

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Alex Crichton via cfe-commits
alexcrichton wrote: Is there a way to "fake" a `wasm-opt` executable? I didn't find any existing tests for the `wasm-opt` integration and it's auto-disabled if `wasm-opt` isn't found on `$PATH`, which doesn't happen by default in the test suite, so unless I can set up `wasm-opt` to show up in

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

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

[clang] [clang] inherit GD to let the codegen add kcfi type for ifunc (PR #96400)

2024-07-10 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The usual mechanism for emitting deferred definitions involves CodeGenModule::EmitDeferred(): declarations get added to the list by addDeferredDeclToEmit(), then it goes through to emit all the declarations on the list. So it's a matter of making sure the resolver ends up

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

2024-07-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/98329 ___ 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 Paul Kirth 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 -fsanitize=alignment,array-bounds,bool,float-cast-overflow,implicit-integer-sign-change,implicit-si

[clang] [clang][OpenMP] Fix region nesting check for `scan` directive (PR #98386)

2024-07-10 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/98386 The previous check was inconsistent. For example, it would allow ``` #pragma omp target #pragma omp parallel for for (...) { #pragma omp scan } ``` but not ``` #pragma omp target parallel for for (...) { #p

[clang] [clang][OpenMP] Fix region nesting check for `scan` directive (PR #98386)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krzysztof Parzyszek (kparzysz) Changes The previous check was inconsistent. For example, it would allow ``` #pragma omp target #pragma omp parallel for for (...) { #pragma omp scan } ``` but not ``` #pragma omp target parallel for for

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/94693 >From 9f6d1cce5e6ba693e9d6bd125e19b3c653ee96dd Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH 1/2] [Clang] Introduce [[clang::coro_inplace_task]] --- clan

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/94693 >From 9f6d1cce5e6ba693e9d6bd125e19b3c653ee96dd Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH 1/2] [Clang] Introduce [[clang::coro_inplace_task]] --- clan

[clang] [clang][OpenMP] Fix region nesting check for `scan` directive (PR #98386)

2024-07-10 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/98386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc] Update libc namespace clang-tidy checks (PR #98088)

2024-07-10 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/98088 >From 94ee0f39f77264a4a5ccdd7d626bfa00841b7b22 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Mon, 8 Jul 2024 15:18:10 -0700 Subject: [PATCH] [libc] Update libc namespace clang-tidy checks Namespace macro that sh

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

2024-07-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. The updated approach makes sense, I think. Please check that AArch64TargetLowering::LowerRETURNADDR works correctly when LR is reserved; I think it should just work, but I'm not completely sure. Otherwise LGTM https://github.com/llv

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

2024-07-10 Thread Amara Emerson via cfe-commits
aemerson wrote: Thanks, the live-in flag seems to be added correctly for the return in the new test. https://github.com/llvm/llvm-project/pull/98073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] 9865171 - [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (#98073)

2024-07-10 Thread via cfe-commits
Author: Amara Emerson Date: 2024-07-10T15:16:51-07:00 New Revision: 9865171e24961d9ae85d7183d5f52c44b82a9c58 URL: https://github.com/llvm/llvm-project/commit/9865171e24961d9ae85d7183d5f52c44b82a9c58 DIFF: https://github.com/llvm/llvm-project/commit/9865171e24961d9ae85d7183d5f52c44b82a9c58.diff

[clang] [llvm] [AArch64] Add -mlr-for-calls-only to replace the now removed -ffixed-x30 flag. (PR #98073)

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

[clang] [clang-tools-extra] [compiler-rt] [flang] [libc] [libclc] [libcxx] [lld] [lldb] [llvm] [BOLT] Match blocks with calls as anchors (PR #96596)

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

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-07-10 Thread Nathan Lanza via cfe-commits
https://github.com/lanza updated https://github.com/llvm/llvm-project/pull/91007 >From 17c81f79ede403e63010a39622d61937fcf898b4 Mon Sep 17 00:00:00 2001 From: Nathan Lanza Date: Fri, 3 May 2024 20:19:45 + Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-8?q

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-07-10 Thread Nathan Lanza via cfe-commits
@@ -2900,7 +2900,7 @@ defm clangir : BoolFOption<"clangir", PosFlag, NegFlag LLVM pipeline to compile">, BothFlags<[], [ClangOption, CC1Option], "">>; -def emit_cir : Flag<["-"], "emit-cir">, Visibility<[CC1Option]>, +def emit_cir : Flag<["-"], "emit-cir">, Visibility<[C

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-07-10 Thread Nathan Lanza via cfe-commits
https://github.com/lanza updated https://github.com/llvm/llvm-project/pull/91007 >From 17c81f79ede403e63010a39622d61937fcf898b4 Mon Sep 17 00:00:00 2001 From: Nathan Lanza Date: Fri, 3 May 2024 20:19:45 + Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?q

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-07-10 Thread Nathan Lanza via cfe-commits
https://github.com/lanza updated https://github.com/llvm/llvm-project/pull/91007 >From 17c81f79ede403e63010a39622d61937fcf898b4 Mon Sep 17 00:00:00 2001 From: Nathan Lanza Date: Fri, 3 May 2024 20:19:45 + Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?q

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-07-10 Thread Nathan Lanza via cfe-commits
https://github.com/lanza updated https://github.com/llvm/llvm-project/pull/91007 >From 17c81f79ede403e63010a39622d61937fcf898b4 Mon Sep 17 00:00:00 2001 From: Nathan Lanza Date: Fri, 3 May 2024 20:19:45 + Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?q

[clang] [compiler-rt] [nsan] Add shared runtime (PR #98415)

2024-07-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/98415 so that `clang -fsanitize=numerical -shared-libsan` will use `libclang_rt.nsan.so` on Linux. Shared runtime is preferred for some platforms (Android, Apple, Fuchsia; though they are not supported yet) and helps p

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-07-10 Thread Nathan Lanza via cfe-commits
https://github.com/lanza updated https://github.com/llvm/llvm-project/pull/91007 >From 17c81f79ede403e63010a39622d61937fcf898b4 Mon Sep 17 00:00:00 2001 From: Nathan Lanza Date: Fri, 3 May 2024 20:19:45 + Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?q

[clang] [compiler-rt] [nsan] Add shared runtime (PR #98415)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Fangrui Song (MaskRay) Changes so that `clang -fsanitize=numerical -shared-libsan` will use `libclang_rt.nsan.so` on Linux. Shared runtime is preferred for some platforms (Android, Apple, Fuchsia; though they are not supported yet)

[clang] [compiler-rt] [nsan] Add shared runtime (PR #98415)

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

[clang] [compiler-rt] [nsan] Add shared runtime (PR #98415)

2024-07-10 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: @eugenis There is a inconsistency now with https://github.com/llvm/llvm-project/pull/98194/files https://github.com/llvm/llvm-project/pull/98415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [compiler-rt] [nsan] Add shared runtime (PR #98415)

2024-07-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/98415 >From 29b11cc74f3358c22214e5a6c9e5042f9c4a7e38 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 10 Jul 2024 16:29:08 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [compiler-rt] [nsan] Add shared runtime (PR #98415)

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

[clang] Adds a pseudonym to clang"s windows mangler... (PR #97792)

2024-07-10 Thread via cfe-commits
@@ -1938,12 +1946,23 @@ void MicrosoftCXXNameMangler::mangleTemplateArgValue(QualType T, mangleNumber(V.getLValueOffset().getQuantity()); } else if (!V.hasLValuePath()) { // FIXME: This can only happen as an extension. Invent a mangling. -break; +

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/94693 >From 9f6d1cce5e6ba693e9d6bd125e19b3c653ee96dd Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH 1/2] [Clang] Introduce [[clang::coro_inplace_task]] --- clan

[clang] [llvm] [Clang][Coroutines] Introducing the `[[clang::coro_inplace_task]]` attribute (PR #94693)

2024-07-10 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/94693 >From 9f6d1cce5e6ba693e9d6bd125e19b3c653ee96dd Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH 1/2] [Clang] Introduce [[clang::coro_inplace_task]] --- clan

[clang] [llvm] [AArch64] Implement GCS ACLE intrinsics (PR #96903)

2024-07-10 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. Thanks, LGTM. As a follow-up, can you check that the instructions generated from this builtin do inhibit the machine outliner? Maybe all GCS-modifying functions have to inhibit the machine outliner, I'm not 100% sure. https://github.com/ll

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-07-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/96422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

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

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-07-10 Thread Eli Friedman via cfe-commits
@@ -1,7 +1,19 @@ -// RUN: %clang_cc1 -emit-llvm < %s | grep "zeroinitializer, i16 16877" +// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefixes=CHECK,EMPTY +// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-windows-msvc -o - | FileCheck %s

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-07-10 Thread Chris B via cfe-commits
llvm-beanz wrote: Is there a reason you need to collect those files for your build tree instead of using them from where Clang built/installed them? https://github.com/llvm/llvm-project/pull/97197 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-10 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/98419 The ability to spell out and specify the resource class is necessary for testing various resource behaviors. Though it is not intended for users to use this in customized HLSL source code, the ability to specif

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

2024-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Joshua Batista (bob80905) Changes The ability to spell out and specify the resource class is necessary for testing various resource behaviors. Though it is not intended for users to use this in customized HLSL source code, the ability to s

[clang] [HLSL] Split out resource class data from resource attribute (PR #98419)

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

[clang] [HLSL] Set default DwarfVersion to 4 for HLSL. (PR #97854)

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

<    1   2   3   4   5   >