[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,52 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 +; RUN: opt --bpf-check-and-opt-ir -S -mtriple=bpf-pc-linux < %s | FileCheck %s + +; Generated from the following C code: +; +; extern int __uptr *magic1(); +; ex

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
@@ -638,6 +643,31 @@ SDValue BPFTargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op, return DAG.getMergeValues(Ops, SDLoc()); } +SDValue BPFTargetLowering::LowerADDRSPACECAST(SDValue Op, + SelectionDAG &DAG) const { + auto *ACast

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,92 @@ +//=== BPFIRPeephole.cpp - IR Peephole Transformation --===// inclyc wrote: nit https://github.com/llvm/llvm-project/pull/84410 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
@@ -31,6 +31,9 @@ def SDT_BPFMEMCPY : SDTypeProfile<0, 4, [SDTCisVT<0, i64>, SDTCisVT<1, i64>, SDTCisVT<2, i64>, SDTCisVT<3, i64>]

[clang-tools-extra] [clang-tidy] Fix Hungarian Prefix in readability-identifier-naming (PR #84236)

2024-03-08 Thread Piotr Zegar via cfe-commits
@@ -229,7 +229,8 @@ Changes in existing checks - Improved :doc:`readability-identifier-naming ` check in `GetConfigPerFile` - mode by resolving symbolic links to header files. + mode by resolving symbolic links to header files. Fixed handling of Hungarian

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-08 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/76357 >From a54f47f8055e898b6452183663863f6df01e98e1 Mon Sep 17 00:00:00 2001 From: wangpc Date: Mon, 25 Dec 2023 18:52:36 +0800 Subject: [PATCH 1/2] [RFC][RISCV] Support RISC-V Profiles in -march option This PR imp

[clang] [clang][ASTMatcher] Add matchers for isExplicitObjectMemberFunction() (PR #84446)

2024-03-08 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/84446 Note that this patch will be necessary to fix `forEachArgumentWithParam()` and `forEachArgumentWithParamType()` matchers for deducing "this"; which is my true motivation. >From 9ffc1b9ec60a9638c5b07cb25574ddb2

[clang] [clang][ASTMatcher] Add matchers for isExplicitObjectMemberFunction() (PR #84446)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balazs Benics (steakhal) Changes Note that this patch will be necessary to fix `forEachArgumentWithParam()` and `forEachArgumentWithParamType()` matchers for deducing "this"; which is my true motivation. --- Full diff: https://github.com

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-08 Thread Wang Pengcheng via cfe-commits
@@ -0,0 +1,189 @@ +//===-- RISCVProfiles.td - RISC-V Profiles -*- tablegen -*-===// +// +// 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: Ap

[clang] [clang][ASTMatcher] Add matchers for isExplicitObjectMemberFunction() (PR #84446)

2024-03-08 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/84446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-08 Thread Wang Pengcheng via cfe-commits
@@ -138,6 +150,8 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo { /// initializeProperties(). RISCVProcFamilyEnum getProcFamily() const { return RISCVProcFamily; } + RISCVProfileEnum getRISCVProfile() const { return RISCVProfile; } wangpc-pp wrote

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-08 Thread Craig Topper via cfe-commits
@@ -0,0 +1,189 @@ +//===-- RISCVProfiles.td - RISC-V Profiles -*- tablegen -*-===// +// +// 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: Ap

[clang] 851ab41 - [clang][test] Fix constant __builtin_popcountg test requiring __int128 (#84412)

2024-03-08 Thread via cfe-commits
Author: OverMighty Date: 2024-03-08T09:50:21+01:00 New Revision: 851ab41d33fcbc72bc334dfc2d5d4c0902ccbb23 URL: https://github.com/llvm/llvm-project/commit/851ab41d33fcbc72bc334dfc2d5d4c0902ccbb23 DIFF: https://github.com/llvm/llvm-project/commit/851ab41d33fcbc72bc334dfc2d5d4c0902ccbb23.diff LO

[clang] [clang][test] Fix constant __builtin_popcountg test requiring __int128 (PR #84412)

2024-03-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/84412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Error on explicit specialization of lambda call operator (PR #84343)

2024-03-08 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/84343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] dd36138 - [clang] Error on explicit specialization of lambda call operator (#84343)

2024-03-08 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2024-03-08T09:52:42+01:00 New Revision: dd36138e9c23c462ce5379a3d83530fb4ebec9e7 URL: https://github.com/llvm/llvm-project/commit/dd36138e9c23c462ce5379a3d83530fb4ebec9e7 DIFF: https://github.com/llvm/llvm-project/commit/dd36138e9c23c462ce5379a3d83530fb4ebec9

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-08 Thread Craig Topper via cfe-commits
@@ -138,6 +150,8 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo { /// initializeProperties(). RISCVProcFamilyEnum getProcFamily() const { return RISCVProcFamily; } + RISCVProfileEnum getRISCVProfile() const { return RISCVProfile; } topperc wrote:

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-08 Thread Haojian Wu via cfe-commits
hokein wrote: > > Thank you for all the reviews, I will wait 1 or 2 days before merging it in > > case anyone has more comments. > > Sure! Do you plan to keep working on completing this feature? Yeah, I plan to complete this feature before the next clang release. If anyone is willing to help,

[clang] 881df55 - [clang] Fix -Wunused-variable in SemaChecking.cpp (NFC)

2024-03-08 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2024-03-08T17:03:51+08:00 New Revision: 881df557501d339c7a14b16d68e43da5c732b424 URL: https://github.com/llvm/llvm-project/commit/881df557501d339c7a14b16d68e43da5c732b424 DIFF: https://github.com/llvm/llvm-project/commit/881df557501d339c7a14b16d68e43da5c732b424.diff LOG: [

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add rounding and exception notes to conversions (PR #83447)

2024-03-08 Thread Phoebe Wang via cfe-commits
@@ -1405,11 +1413,12 @@ static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_cvtss_sd(__m128d __a, /// Converts the two double-precision floating-point elements of a ///128-bit vector of [2 x double] into two signed 32-bit integer values, -///returned in the lower 64 bits

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-08 Thread Wang Pengcheng via cfe-commits
@@ -0,0 +1,189 @@ +//===-- RISCVProfiles.td - RISC-V Profiles -*- tablegen -*-===// +// +// 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: Ap

[clang] [Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (PR #83842)

2024-03-08 Thread via cfe-commits
bgra8 wrote: @sdkrystian we, at google, bisected lots (~1k) of clang crashes to this revision. Looks to me Facebook code is also impacted. We need some time to provide a repro. Until then can you please revert? https://github.com/llvm/llvm-project/pull/83842 ___

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Balázs Kéri via cfe-commits
balazske wrote: Additionally, the checked preconditions look not exact. For example the POSIX documentation for `getdelim` says: "If *n is non-zero, the application shall ensure that *lineptr either points to an object of size at least *n bytes, or is a null pointer." This means `*lineptr` can

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-08 Thread Axel Lundberg via cfe-commits
Zonotora wrote: @zygoloid @AaronBallman any updates? https://github.com/llvm/llvm-project/pull/75481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add specific results to comparisons (PR #83316)

2024-03-08 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: > @RKSimon note this will affect what the tooltips show. Is that okay? I think so - we're just losing the extra info about -1/0 or 1/0 result values? https://github.com/llvm/llvm-project/pull/83316 ___ cfe-commits mailing list cfe-commi

[clang] [clang][ASTMatcher] Add matchers for isExplicitObjectMemberFunction() (PR #84446)

2024-03-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/84446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-03-08 Thread via cfe-commits
cor3ntin wrote: > BTW, should we close #54051 with this PR? or should we keep it open until the > feature is fully implemented? The `is_deducible` part is a major missing > piece, I think we can close #54051 and open a separate issue to track the > missing piece, WDYT? Sounds good https://gi

[clang] [clang][ASTMatcher] Add matchers for isExplicitObjectMemberFunction() (PR #84446)

2024-03-08 Thread Balazs Benics via cfe-commits
steakhal wrote: Thanks for the prompt review @PiotrZSL! I plan to merge it by the end of the day, unless someone objects. https://github.com/llvm/llvm-project/pull/84446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [Clang] [Sema] No longer diagnose type definitions in `offsetof` in C23 mode (PR #84169)

2024-03-08 Thread via cfe-commits
Sirraide wrote: > Should we verify that we diagnose the case where the definition includes a > comma? It’s UB if the type contains a comma (unless I’m somehow looking at the wrong C standard again...), so I don’t think we need to diagnose it. https://github.com/llvm/llvm-project/pull/84169 __

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/82310 >From f340fb3dd66e436566d5a65da0a35d77a6a0bde6 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 20 Feb 2024 14:54:14 +0800 Subject: [PATCH 1/4] The lambda call inside of a type alias --- clang/docs/Releas

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/82310 >From f340fb3dd66e436566d5a65da0a35d77a6a0bde6 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 20 Feb 2024 14:54:14 +0800 Subject: [PATCH 1/5] The lambda call inside of a type alias --- clang/docs/Releas

[clang] [flang] [flang][draft] Improve debug info generation. (PR #84202)

2024-03-08 Thread via cfe-commits
jeanPerier wrote: Great to see work on debug info, thanks! I am in line with @tblah that we should aim at generating it from FIR/HLFIR as much as possible. For types, as Tom mentioned, fir.type_info could be updated to be created with the type declaration location if it is not already the cas

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-08 Thread Alejandro Álvarez Ayllón via cfe-commits
alejandro-alvarez-sonarsource wrote: > : "If *n is non-zero, the application shall ensure that *lineptr either > points to an object of size at least *n bytes, or is a null pointer." Ah! I was following at the 2008 version, and there "[...], or is a null pointer." is missing. I will update acc

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/82310 >From f340fb3dd66e436566d5a65da0a35d77a6a0bde6 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 20 Feb 2024 14:54:14 +0800 Subject: [PATCH 1/6] The lambda call inside of a type alias --- clang/docs/Releas

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good to me. https://github.com/llvm/llvm-project/pull/82310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-08 Thread Younan Zhang via cfe-commits
zyn0217 wrote: So, I have: 1. rebased the patch on top of the recent Sema refactors. 2. incorporated the fix for https://github.com/llvm/llvm-project/issues/82104, which is a slight change on `HandleFunction`. 3. separated the `CodeSynthesisContext` iteration logic into three helper functions i

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-08 Thread Andreas Fertig via cfe-commits
@@ -6898,10 +6898,18 @@ class Sema final { BinaryOperatorKind Operator); ActOnCXXThis - Parse 'this' pointer. - ExprResult ActOnCXXThis(SourceLocation loc); + /// + /// \param SkipLambdaCaptureCheck Whether to skip the 'this' check

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-08 Thread Andreas Fertig via cfe-commits
https://github.com/andreasfertig edited https://github.com/llvm/llvm-project/pull/84193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

2024-03-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/82310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (#83842)" (PR #84457)

2024-03-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/84457 This reverts commit a642eb89bdaf10c6b4994fc1187de27b441236ed. >From 02f98e180b94bec0c6abafeaaf8a7513f5116eab Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 8 Mar 2024 05:44:48 -0500 Subject: [P

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-03-08 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin All checks are green now. Could you help me land this patch for me? https://github.com/llvm/llvm-project/pull/77584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] Revert "[Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (#83842)" (PR #84457)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes This reverts commit a642eb89bdaf10c6b4994fc1187de27b441236ed. --- Full diff: https://github.com/llvm/llvm-project/pull/84457.diff 4 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (-2)

[clang] Revert "[Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (#83842)" (PR #84457)

2024-03-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/84457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (#83842)" (PR #84457)

2024-03-08 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/84457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ee94bd2 - Revert "[Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (#83842)" (#84457)

2024-03-08 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-03-08T05:57:04-05:00 New Revision: ee94bd20ba09975de493675dd6a0b7fc7dd5cece URL: https://github.com/llvm/llvm-project/commit/ee94bd20ba09975de493675dd6a0b7fc7dd5cece DIFF: https://github.com/llvm/llvm-project/commit/ee94bd20ba09975de493675dd6a0b7fc7dd5cece

[clang] [clang][NFC] Refactor `clang/test/SemaCXX/type-traits.cpp` to use modern `static_assert` (PR #77584)

2024-03-08 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/77584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Change representation of getelementptr inrange (PR #84341)

2024-03-08 Thread Nikita Popov via cfe-commits
nikic wrote: > Have you thought about the implications for dynamic (non-constant) indices? inrange is only supported on constant expressions, and I think the consensus is that it should not be extended to non-constant cases. In that case, we would represent the information independently of the

[clang] [Clang][Sema] Fix crash when using name of UnresolvedUsingValueDecl with template arguments (PR #83842)

2024-03-08 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @bgra8 Reverted. Any sort of repro would be appreciated :) https://github.com/llvm/llvm-project/pull/83842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-08 Thread Andreas Fertig via cfe-commits
https://github.com/andreasfertig updated https://github.com/llvm/llvm-project/pull/84193 >From 680c99b2d832a5fad617f632df4a750f9c6f1cae Mon Sep 17 00:00:00 2001 From: Andreas Fertig Date: Wed, 6 Mar 2024 14:20:00 +0100 Subject: [PATCH] [C++20][Coroutines] Lambda-coroutine with operator new in

[clang] [Sema] Avoid unnecessary copy on MultiLevelTemplateArgumentList. NFC (PR #84459)

2024-03-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/84459 We don't modify the MLTAL parameter in `SetupConstraintScope`, and it is better if we don't copy the 120-byte object each time we call the function. >From 6d51233690d0030e3191198c1a7a330be723b1af Mon Sep 17 00:0

[clang] [Sema] Avoid unnecessary copy on MultiLevelTemplateArgumentList. NFC (PR #84459)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes We don't modify the MLTAL parameter in `SetupConstraintScope`, and it is better if we don't copy the 120-byte object each time we call the function. --- Full diff: https://github.com/llvm/llvm-project/pull/8

[clang] [llvm] [IR] Change representation of getelementptr inrange (PR #84341)

2024-03-08 Thread Nikita Popov via cfe-commits
nikic wrote: > And then want to restrict inrange to the inner array, then for the > source-relative case we can write: > > ``` > %p1 = ptradd ptr %base, i32 %outer_idx * 44 > %p2 = ptradd ptr inrange(0, 40) %p1, i32 %inner_idx * 4 > ``` > > While the result-relative case can't represent this wi

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-08 Thread Andreas Fertig via cfe-commits
@@ -1378,8 +1379,21 @@ bool CoroutineStmtBuilder::makeReturnOnAllocFailure() { static bool collectPlacementArgs(Sema &S, FunctionDecl &FD, SourceLocation Loc, SmallVectorImpl &PlacementArgs) { if (auto *MD = dyn_cast(&FD)) { -if (MD->isImp

[clang] [Sema] Avoid unnecessary copy on MultiLevelTemplateArgumentList. NFC (PR #84459)

2024-03-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Changes to `Sema.h` look good to me. https://github.com/llvm/llvm-project/pull/84459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-08 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/84460 IncrementalExecutor is an implementation detail of the Interpreter. In order to test extended features properly, we must be able to setup and tear down the executor manually. From 10f8d3eb040a5838d84d8a8

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-08 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/84461 The LLJITBuilder interface provides a very convenient way to configure the ORCv2 JIT engine. IncrementalExecutor already used it internally to construct the JIT, but didn't provide external access. This p

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-08 Thread Andreas Fertig via cfe-commits
@@ -0,0 +1,54 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -I%S/Inputs -std=c++20 %s + +// expected-no-diagnostics + +#include "std-coroutine.h" + +using size_t = decltype(sizeof(0)); + +struct Generator { + struct promise_type { +int _val{}; + +Generator get_return_objec

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-08 Thread via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Stefan Gränitz (weliveindetail) Changes IncrementalExecutor is an implementation detail of the Interpreter. In order to test extended features properly, we must be able to setup and te

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-08 Thread via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Stefan Gränitz (weliveindetail) Changes The LLJITBuilder interface provides a very convenient way to configure the ORCv2 JIT engine. IncrementalExecutor al

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-08 Thread Andreas Fertig via cfe-commits
@@ -1434,13 +1434,18 @@ ExprResult Sema::ActOnCXXThis(SourceLocation Loc) { return Diag(Loc, diag::err_invalid_this_use) << 0; } - return BuildCXXThisExpr(Loc, ThisTy, /*IsImplicit=*/false); + return BuildCXXThisExpr(Loc, ThisTy, /*IsImplicit=*/false, +

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-08 Thread via cfe-commits
Stefan =?utf-8?q?Gränitz?= 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 5d33f7176b002da244823ca0e6b5247

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From da384cdf38f64d7c956c07b007f417dd223177ef Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that r

[clang] [llvm] [IR] Change representation of getelementptr inrange (PR #84341)

2024-03-08 Thread Nikita Popov via cfe-commits
nikic wrote: So yeah, I think the source-relative representation is better if we consider only the current vtable / GlobalSplit use case (where we'd just convert result-relative to source-relative anyway), while the result-relative representation is better if we consider a potential extension

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-08 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: This PR was factored out for isolated review and to reduce the size of the follow-up patch in https://github.com/llvm/llvm-project/pull/84461. It depends on the previous change in https://github.com/llvm/llvm-project/pull/83126. Combined patch size will shrink significant

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-08 Thread Stefan Gränitz via cfe-commits
@@ -373,21 +373,32 @@ Interpreter::Parse(llvm::StringRef Code) { static llvm::Expected createJITTargetMachineBuilder(const std::string &TT) { if (TT == llvm::sys::getProcessTriple()) +// This fails immediately if the target backend is not registered return llvm::orc:

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-08 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail commented: This PR depends on two predecessor patches, but I wanted to share it for review already. For the moment please refer to the single commit in https://github.com/llvm/llvm-project/pull/84461/commits/cc46034e5288ba54dfc8a0ea7d54792cbb99227d for review.

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-08 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail edited https://github.com/llvm/llvm-project/pull/84461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-08 Thread Stefan Gränitz via cfe-commits
@@ -102,4 +124,97 @@ TEST(InterpreterExtensionsTest, FindRuntimeInterface) { EXPECT_EQ(1U, Interp.RuntimeIBPtr->TransformerQueries); } +class CustomJBInterpreter : public Interpreter { + using CustomJITBuilderCreatorFunction = + std::function>()>; + CustomJITBuilderC

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-08 Thread Stefan Gränitz via cfe-commits
@@ -102,4 +124,97 @@ TEST(InterpreterExtensionsTest, FindRuntimeInterface) { EXPECT_EQ(1U, Interp.RuntimeIBPtr->TransformerQueries); } +class CustomJBInterpreter : public Interpreter { + using CustomJITBuilderCreatorFunction = + std::function>()>; + CustomJITBuilderC

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-08 Thread Andreas Fertig via cfe-commits
https://github.com/andreasfertig updated https://github.com/llvm/llvm-project/pull/84193 >From 9f8a741864b01e89ea17b5ea4c4296da27ef Mon Sep 17 00:00:00 2001 From: Andreas Fertig Date: Wed, 6 Mar 2024 14:20:00 +0100 Subject: [PATCH] [C++20][Coroutines] Lambda-coroutine with operator new in

[clang-tools-extra] [clang-tidy] Fix Hungarian Prefix in readability-identifier-naming (PR #84236)

2024-03-08 Thread Dmitry Polukhin via cfe-commits
@@ -229,7 +229,8 @@ Changes in existing checks - Improved :doc:`readability-identifier-naming ` check in `GetConfigPerFile` - mode by resolving symbolic links to header files. + mode by resolving symbolic links to header files. Fixed handling of Hungarian

[clang-tools-extra] [clang-tidy] Fix Hungarian Prefix in readability-identifier-naming (PR #84236)

2024-03-08 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin approved this pull request. https://github.com/llvm/llvm-project/pull/84236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Avoid unnecessary copy on MultiLevelTemplateArgumentList. NFC (PR #84459)

2024-03-08 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/84459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/84469 Previously, the function `isCLibraryFunction()` and logic relying on it only accepted functions that are declared directly within a TU (i.e. not in a namespace or a class). However C++ headers like declare ma

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (NagyDonat) Changes Previously, the function `isCLibraryFunction()` and logic relying on it only accepted functions that are declared directly within a TU (i.e. not in a namespace or a class). However C++ headers like decla

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 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 6a0618a0289cb0c23ef3e5c820418650cc1d0fdc c357aa998204e6693430c801f5b7d3a9e5e09e37 --

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/84469 >From c357aa998204e6693430c801f5b7d3a9e5e09e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Fri, 8 Mar 2024 13:06:01 +0100 Subject: [PATC

[clang] 5d98d88 - [Sema] Avoid unnecessary copy on MultiLevelTemplateArgumentList. NFC (#84459)

2024-03-08 Thread via cfe-commits
Author: Younan Zhang Date: 2024-03-08T20:26:31+08:00 New Revision: 5d98d8822c69bc9d32c25190beaf1eaccf9ddd37 URL: https://github.com/llvm/llvm-project/commit/5d98d8822c69bc9d32c25190beaf1eaccf9ddd37 DIFF: https://github.com/llvm/llvm-project/commit/5d98d8822c69bc9d32c25190beaf1eaccf9ddd37.diff

[clang] [Sema] Avoid unnecessary copy on MultiLevelTemplateArgumentList. NFC (PR #84459)

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

[clang] [clang][ASTMatcher] Add matchers for isExplicitObjectMemberFunction() (PR #84446)

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

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/84469 >From c357aa998204e6693430c801f5b7d3a9e5e09e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Fri, 8 Mar 2024 13:0

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-08 Thread Andreas Fertig via cfe-commits
andreasfertig wrote: The clang-format check fails due to a change in `clang/docs/ReleaseNotes. rst`, which isn't mine. What's the protocol? Shall I fix the format issue, or can my change be merged anyway? https://github.com/llvm/llvm-project/pull/84193 _

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 1c37abe8f7b26bd44fcf8e18a4cbc5104c7bd908 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that r

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM - but @pogo59 needs a headup as it will affect some ongoing documentation cleanup work https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus commented: Makes perfect sense to me. Can you add a testcase for `std::malloc` or something similar? https://github.com/llvm/llvm-project/pull/84469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
@@ -87,9 +87,11 @@ bool CheckerContext::isCLibraryFunction(const FunctionDecl *FD, if (!II) return false; - // Look through 'extern "C"' and anything similar invented in the future. - // If this function is not in TU directly, it is not a C library function. - if (!F

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
@@ -41,12 +41,8 @@ class CallDescription { /// - We also accept calls where the number of arguments or parameters is ///greater than the specified value. /// For the exact heuristics, see CheckerContext::isCLibraryFunction(). -/// Note that functions whose

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus edited https://github.com/llvm/llvm-project/pull/84469 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: NagyDonat wrote: Currently MallocChecker doesn't use this `CDM::CLibrary` mode in the `CallDescription` for `malloc` -- because before this commit it would've been incorrect to use it. I'm planning to ensure that functi

[clang] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-08 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -41,12 +41,8 @@ class CallDescription { /// - We also accept calls where the number of arguments or parameters is ///greater than the specified value. /// For the exact heuristics, s

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Hmm, the rules are different between C and C++, but I think we may be okay. In C++: https://eel.is/c++draft/enum#dcl.enum-5.sentence-6 Following the closing brace of an enum-specifier, each enumerator has the type of its enumeration.

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

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

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread Aaron Ballman via cfe-commits
@@ -264,11 +264,14 @@ namespace { } QualType Expr::getEnumCoercedType(const ASTContext &Ctx) const { - if (isa(this->getType())) -return this->getType(); - else if (const auto *ECD = this->getEnumConstantDecl()) -return Ctx.getTypeDeclType(cast(ECD->getDeclContext())

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread Aaron Ballman via cfe-commits
@@ -6,7 +6,9 @@ typedef enum EnumA { } EnumA; enum EnumB { - B + B, AaronBallman wrote: It might be good to capture some of what I wrote in the review summary as a comment here so it's clear why this is correct in both C and C++. https://github.com/llvm/l

[clang] 4d1d127 - [HIP] Make the HIP default architecture use the enum value (#84400)

2024-03-08 Thread via cfe-commits
Author: Joseph Huber Date: 2024-03-08T06:54:52-06:00 New Revision: 4d1d1271b8612c72e0020c9d9f42d2ef70f717e7 URL: https://github.com/llvm/llvm-project/commit/4d1d1271b8612c72e0020c9d9f42d2ef70f717e7 DIFF: https://github.com/llvm/llvm-project/commit/4d1d1271b8612c72e0020c9d9f42d2ef70f717e7.diff

[clang] [HIP] Make the HIP default architecture use the enum value (PR #84400)

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

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/84473 This is still WIP, but I figured I’d open a pr anyway to share what I’ve discovered so far. In short, dependence of captures in lambdas with an explicit object parameter is all kinds of broken at the moment. [

[clang] [Clang] [Sema] WIP: Fix dependence of DREs in lambdas with an explicit object parameter (PR #84473)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide converted_to_draft https://github.com/llvm/llvm-project/pull/84473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >