[clang] [C++20] [Modules] Implementing Eliding Unreachable Decls of GMF in ASTWriter (PR #76930)

2024-01-04 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 7a3b0cbb143d02b70b2bfae5cd40e9867c124748 b9a03912276d25ff819a755bef4ee72d64ce1480 --

[clang] [C++20] [Modules] Implementing Eliding Unreachable Decls of GMF in ASTWriter (PR #76930)

2024-01-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Chuanqi Xu (ChuanqiXu9) Changes This was a patch to try to implement eliding unreachable decls in GMF in ASTWriter. It was developed a half year ago and I just rebased it but I did't fix the failing

[clang] [C++20] [Modules] Implementing Eliding Unreachable Decls of GMF in ASTWriter (PR #76930)

2024-01-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 converted_to_draft https://github.com/llvm/llvm-project/pull/76930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Implementing Eliding Unreachable Decls of GMF in ASTWriter (PR #76930)

2024-01-04 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/76930 This was a patch to try to implement eliding unreachable decls in GMF in ASTWriter. It was developed a half year ago and I just rebased it but I did't fix the failing test. It ran well. The core idea of

[clang] [analyzer] Add std::any checker (PR #76580)

2024-01-04 Thread via cfe-commits
=?utf-8?q?Gábor?= Spaits,=?utf-8?q?Gábor?= Spaits, =?utf-8?q?Gábor?= Spaits,=?utf-8?q?Gábor?= Spaits, =?utf-8?q?Gábor?= Spaits Message-ID: In-Reply-To: @@ -87,6 +85,28 @@ bool isStdVariant(const Type *Type) { return isStdType(Type, llvm::StringLiteral("variant")); } +bool

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: Destroyerrrocket wrote: Addressed the first review comments! Thank you for your time, I appreciate it :) https://github.com/llvm/llvm-project/pull/76825 ___ cfe-commits mailing list

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: https://github.com/Destroyerrrocket updated https://github.com/llvm/llvm-project/pull/76825 >From 1ab4538e194f9a77c500e4a93b1875eb7e76dcf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pol=20Marcet=20Sard=C3=A0?= Date: Wed, 3 Jan 2024

[clang] [Sema] Warning for _Float16 passed to format specifier '%f' (PR #74439)

2024-01-04 Thread Haocong Lu via cfe-commits
https://github.com/Luhaocong updated https://github.com/llvm/llvm-project/pull/74439 >From 899e18d1ca94efad41c2e09dff0a3213d7fb0f7e Mon Sep 17 00:00:00 2001 From: Lu Haocong Date: Tue, 5 Dec 2023 16:45:22 +0800 Subject: [PATCH] [Sema] Warning for _Float16 passed to format specifier '%f'

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -504,68 +502,6 @@ TEST_F(ExtractVariableTest, Test) { int main() { auto placeholder = []() { return 42; }(); return placeholder ; })cpp"}, - {R"cpp( kadircet wrote: again you can keep this test around by prepending a `+` to

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -27,10 +27,10 @@ TEST_F(ExtractVariableTest, Test) { return t.b[[a]]r]]([[t.z]])]]; } void f() { - int a = [[5 +]] [[4 * xyz]](); + int a = 5 + [[4 * xyz]](); // multivariable initialization if(1) -int x =

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -490,6 +491,13 @@ bool eligibleForExtraction(const SelectionTree::Node *N) { BO->getRHS() == OuterImplicit.ASTNode.get()) return false; } + if (const auto *Decl = Parent->ASTNode.get()) { +if (!Decl->isInitCapture() && kadircet wrote:

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -422,8 +422,6 @@ TEST_F(ExtractVariableTest, Test) { int member = 42; }; )cpp"}, - {R"cpp(void f() { auto x = [[ [](){ return 42; }]]; })cpp", kadircet wrote: let's change this to `auto x = +[[ ... ]]`, to make sure

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2024-01-04 Thread kadir çetinkaya via cfe-commits
@@ -504,68 +502,6 @@ TEST_F(ExtractVariableTest, Test) { int main() { auto placeholder = []() { return 42; }(); return placeholder ; })cpp"}, - {R"cpp( -template -void foo(Ts ...args) { - auto x = [[ []() {} ]]; -

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2024-01-04 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus closed https://github.com/llvm/llvm-project/pull/75448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7954c57 - [IR] Fix GEP offset computations for vector GEPs (#75448)

2024-01-04 Thread via cfe-commits
Author: Jannik Silvanus Date: 2024-01-04T10:08:21+01:00 New Revision: 7954c57124b495fbdc73674d71f2e366e4afe522 URL: https://github.com/llvm/llvm-project/commit/7954c57124b495fbdc73674d71f2e366e4afe522 DIFF:

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Pol M via cfe-commits
@@ -210,38 +253,26 @@ void clang::EmitClangDeclContext(RecordKeeper , raw_ostream ) { OS << "#ifndef DECL_CONTEXT\n"; OS << "# define DECL_CONTEXT(DECL)\n"; OS << "#endif\n"; - - OS << "#ifndef DECL_CONTEXT_BASE\n"; - OS << "# define DECL_CONTEXT_BASE(DECL)

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Pol M via cfe-commits
@@ -196,8 +227,20 @@ void ClangASTNodesEmitter::run(raw_ostream ) { } void clang::EmitClangASTNodes(RecordKeeper , raw_ostream , - const std::string , const std::string ) { - ClangASTNodesEmitter(RK, N, S).run(OS); +

[clang-tools-extra] [clangd] Dont require confirmation for include-cleaner batch-fixes (PR #76826)

2024-01-04 Thread Haojian Wu via cfe-commits
@@ -237,18 +236,6 @@ removeAllUnusedIncludes(llvm::ArrayRef UnusedIncludes) { Diag.Fixes.front().Edits.begin(), Diag.Fixes.front().Edits.end()); } - - // TODO(hokein): emit a suitable text for the label. -

[clang-tools-extra] [clangd] Dont require confirmation for include-cleaner batch-fixes (PR #76826)

2024-01-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. This change makes sense for removing all unused includes (as all these unused includes are visible in the editor). For missing includes, they are less obvious, but it is probably fine. (I think it would be great to have a way to view all

[clang-tools-extra] [clangd] Dont require confirmation for include-cleaner batch-fixes (PR #76826)

2024-01-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/76826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Pol M via cfe-commits
@@ -95,8 +103,31 @@ std::pair ClangASTNodesEmitter::EmitNode(raw_ostream , if (!Base.isAbstract()) First = Last = Base; + class Comp { Destroyerrrocket wrote: I'll make this a lambda https://github.com/llvm/llvm-project/pull/76825

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread Pol M via cfe-commits
Destroyerrrocket wrote: The reason for puting the classes with DeclContext closer together is to achieve a better code generation. Here's an example of the asssembly with just the removal of the DECL_CONTEXT_BASE macro: ``` clang::Decl::castToDeclContext(clang::Decl const*): #

[lld] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [clang] [flang] [libc] [libcxx] [libc++][ranges] P2116R9: Implements `views::enumerate` (PR #73617)

2024-01-04 Thread Hristo Hristov via cfe-commits
@@ -0,0 +1,333 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2024-01-04 Thread Iain Sandoe via cfe-commits
iains wrote: > Like I said in the commit message, this patch itself doesn't involve anything > relevant to user interfaces. I left it to the latter patches. Are you in a position to post the next patch (at least as a draft)? That would help me see the direction. > > * I was concerned from

[clang] [clang-format] Add .clang-format-ignore for ignoring files (PR #76327)

2024-01-04 Thread Balazs Benics via cfe-commits
steakhal wrote: FYI commit 09308122c6c0fa9eb3d729a2b2909733cbbc2160 added [a test](https://github.com/llvm/llvm-project/commit/09308122c6c0fa9eb3d729a2b2909733cbbc2160#diff-acfc8d9d85320dbf5e181b8aebb248a91b1d321c8798bae3663b44b0c08213db) that does not pass on Windows (MSVC). An example

[clang-tools-extra] [lldb] [compiler-rt] [llvm] [clang] [flang] [libc] [lldb][NFC] Fix compilation issue on windows (PR #76453)

2024-01-04 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/76453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Optimize processing .clang-format-ignore files (PR #76733)

2024-01-04 Thread Owen Pan via cfe-commits
owenca wrote: It had passed my local tests (x64 Native Tools Command Prompt for VS 2022) and the buildkite win build, so I wonder if it has something to do with the grep in the failed buildbot (only https://lab.llvm.org/buildbot/#/builders/123/builds/23808 so far) as I only used the POSIX

[clang] [Cygwin] Cygwin basic support (PR #74868)

2024-01-04 Thread 徐持恒 Xu Chiheng via cfe-commits
https://github.com/xu-chiheng edited https://github.com/llvm/llvm-project/pull/74868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] static operators should evaluate object argument (PR #68485)

2024-01-04 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Ping. https://github.com/llvm/llvm-project/pull/68485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][USM] Adds test for -fopenmp-force-usm flag (PR #75467)

2024-01-04 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: The IR is impacted for the global that is in that test case. Lines ~46-50 (first IR section) vs line ~68 (second IR section). The remaining code is indeed the same. The way that this test is executed is out of date however, given that I have reimplemented the flag. My plan is to

[lldb] [clang] [llvm] [lld] [compiler-rt] [libcxx] [flang] [libc] [clang-tools-extra] [libc++][ranges] P2116R9: Implements `views::enumerate` (PR #73617)

2024-01-04 Thread Hristo Hristov via cfe-commits
H-G-Hristov wrote: > Thanks for working on this! There's a fair bit that I've provided comments > for, but I think you're off to a great start, and I would like to see this > merged in January, if at all possible. > > Some comments are short and repetitive: those are usually coupled with a >

[lldb] [clang] [llvm] [mlir] [libc] [NFC][ObjectSizeOffset] Use classes instead of std::pair (PR #76882)

2024-01-04 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/76882 >From ca7a96a40952fe94b916dacc52f07aa90bbdb1e7 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 3 Jan 2024 13:22:37 -0800 Subject: [PATCH 1/5] [builtin_object_size] Use classes instead of std::pair

[clang] [clang][analyzer] Support 'fdopen' in the StreamChecker (PR #76776)

2024-01-04 Thread Ben Shi via cfe-commits
benshi001 wrote: > One note that should be added to the documentation: The `StreamChecker` does > not handle file descriptors associated to streams. Therefore some issues can > appear, for example `fileno` does not return the value that was used to open > a stream with `fdopen`, and the

[clang] [clang] Optimize castToDeclContext for 2% improvement in build times (PR #76825)

2024-01-04 Thread via cfe-commits
@@ -95,8 +103,31 @@ std::pair ClangASTNodesEmitter::EmitNode(raw_ostream , if (!Base.isAbstract()) First = Last = Base; + class Comp { cor3ntin wrote: Yes, this might as well be a lambda. I also think some comment to explain what PriorizeIfSubclassOf

<    1   2   3   4   5   6