[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Thank you for letting me know! Given the amount of positive feedback I've heard about this effort, I think we'll continue, trying to claw back the compile times elsewhere (my recent patch that removed try_compile checks from CMake should've helped, even if it's not counted in

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: DR test changes look good. https://github.com/llvm/llvm-project/pull/93873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -74,8 +74,8 @@ On Unix-like Systems https://llvm.org/docs/CMake.html#frequently-used-cmake-variables;>frequently used cmake variables for more options. -cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ../llvm

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/93503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -18,6 +30,38 @@ void f(B b) { struct D : B {}; } // namespace cwg2718 +namespace cwg2749 { // cwg2749: 19 + +extern int x[2]; +struct Y { + int i; + int j; +}; +extern Y y[2]; + +#if __cplusplus >= 201103L +static_assert(static_cast(x + 0) < static_cast(x + 1), "");

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -1,11 +1,32 @@ -// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify=expected -// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify=expected,since-cxx11,cxx11 -// RUN: %clang_cc1 -std=c++14 -triple x86_64-unknown-unknown %s

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -18,6 +30,38 @@ void f(B b) { struct D : B {}; } // namespace cwg2718 +namespace cwg2749 { // cwg2749: 19 + +extern int x[2]; +struct Y { + int i; + int j; +}; +extern Y y[2]; + +#if __cplusplus >= 201103L +static_assert(static_cast(x + 0) < static_cast(x + 1), "");

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -1,11 +1,23 @@ -// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++98 -verify=expected %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++98 -Wgnu-folding-constant -verify=expected %s Endilll wrote: I hope `-Wgnu-folding-constant` is not going to be

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -18,6 +30,38 @@ void f(B b) { struct D : B {}; } // namespace cwg2718 +namespace cwg2749 { // cwg2749: 19 + +extern int x[2]; +struct Y { + int i; + int j; +}; +extern Y y[2]; + +#if __cplusplus >= 201103L Endilll wrote: If you need to match diagnostics

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -18,6 +30,38 @@ void f(B b) { struct D : B {}; } // namespace cwg2718 +namespace cwg2749 { // cwg2749: 19 + +extern int x[2]; +struct Y { + int i; + int j; +}; +extern Y y[2]; + +#if __cplusplus >= 201103L +static_assert(static_cast(x + 0) < static_cast(x + 1), "");

[clang] [clang][OpenMP] Simplify check for repeated clauses (PR #93611)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/93611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang][NFC] Move `PDiag` into `SemaBase` (PR #93849)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Move `PDiag` into `SemaBase` (PR #93849)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/93849 This patch moves `PDiag` into `SemaBase`, make it readily available everywhere across `Sema` without `SemaRef`, like the regular `Diag`. >From e2f08e845aa4c2d1af0247c3e03783522b49cf12 Mon Sep 17 00:00:00 2001

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -67,15 +67,13 @@ On Unix-like Systems Build LLVM and Clang: cd llvm-project -mkdir build (in-tree build is not supported) -cd build This builds both LLVM and Clang in release mode. Alternatively, if you need a debug build, switch Release to

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -24,6 +44,103 @@ using enum E; #endif } +namespace cwg2627 { // cwg2627: 19 +#if __cplusplus >= 202002L +struct C { + long long i : 8; + friend auto operator<=>(C, C) = default; +}; + +void f() { + C x{1}, y{2}; + static_cast(x <=> y); + static_cast(x.i <=> y.i); +} +

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for working on this! https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think the issue is that we no longer passed `-fno-lifetime-dse` to GCC due to incorrect condition (my fault), which caused some downstream LTO crashes as reported by @mveriksson in https://github.com/llvm/llvm-project/commit/4feae05c6abda364a9295aecfa600d7d4e7dfeb6#r142466703

[clang] [clang] CWG150: add tests and change to unreleased (PR #93758)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: This looks good to me now. The contents of the test go over my head, though. https://github.com/llvm/llvm-project/pull/93758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] CWG150: add tests and change to unreleased (PR #93758)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
@@ -753,6 +753,46 @@ namespace cwg148 { // cwg148: yes // cwg149: na +namespace cwg150 { // cwg150: yes Endilll wrote: ```suggestion namespace cwg150 { // cwg150: 19 ``` https://github.com/llvm/llvm-project/pull/93758

[clang] [clang] CWG150: add tests and change to unreleased (PR #93758)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. You should apply the suggested change, and run `make_cxx_dr_status` script. I don't expect it to introduce new changes, though, but we should be on a safe side here, and not rely on manual editing of `cxx_dr_status.html`.

[clang] [clang] CWG150: add tests and change to unreleased (PR #93758)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add another test case for CWG78 (PR #93708)

2024-05-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93708 >From 210d58b7133aeb007d423464bcd40d016fc25863 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 29 May 2024 15:57:30 +0300 Subject: [PATCH] [clang] Add another test case for CWG78 ---

[clang] [clang] Add another test case for CWG78 (PR #93708)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/93708 This issue is concerned with initialization of static objects that are not of non-POD class types. It affirms that default initialization of such objects that typically leaves them with an indeterminate value

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,36 @@ +//===- Attr.h --- Helper functions for attribute handling in Sema -===// +// +// 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:

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. I'm fine with `cmake --build`, but I don't think that replacing `cd` with `-S` and `-B` is an improvement. https://github.com/llvm/llvm-project/pull/93503 ___ cfe-commits mailing list

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
@@ -67,15 +67,13 @@ On Unix-like Systems Build LLVM and Clang: cd llvm-project -mkdir build (in-tree build is not supported) -cd build This builds both LLVM and Clang in release mode. Alternatively, if you need a debug build, switch Release to

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types + /// AND the ParsedAttr. + template + static std::enable_if_t, SourceLocation> + getAttrLoc(const AttrInfo ) {

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > `const_cast` here is a relatively recent addition, and I checked out with > > @erichkeane that the use case (pack expansion) is legit. According to the > > approach you're suggesting, the one who wrote this `const_cast` should > > instead refactor the MLTAL to use

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think I should post here an example from our codebase that made me think twice about this PR. First, there's a `MultiLevelTemplateArgumentList` (MLTAL for short), which I believe is one of the backbones of our template engine:

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types + /// AND the ParsedAttr. + template + static std::enable_if_t, SourceLocation> + getAttrLoc(const AttrInfo ) {

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -67,15 +67,13 @@ On Unix-like Systems Build LLVM and Clang: cd llvm-project -mkdir build (in-tree build is not supported) -cd build This builds both LLVM and Clang in release mode. Alternatively, if you need a debug build, switch Release to

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
@@ -1,82 +0,0 @@ -#===--===## Endilll wrote: Committed as 681fc40d68936f145963207236d62886e5a34e5d https://github.com/llvm/llvm-project/pull/93318

[clang] 42b4be6 - [clang][NFC] Remove `utils/ci/run-buildbot` script

2024-05-28 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-28T13:45:22+03:00 New Revision: 42b4be6d7b896fcf2ef16818862a5be3e98ca791 URL: https://github.com/llvm/llvm-project/commit/42b4be6d7b896fcf2ef16818862a5be3e98ca791 DIFF:

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -1,82 +0,0 @@ -#===--===## Endilll wrote: I decided to keep it intact out of caution, and asked on Discord instead whether this file is still needed.

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Sounds like you have a plan after this PR, which is good. I was worried that you're just applying `const` where it doesn't cause issues _today_. Such approach to const-correctness has been failing us (it leads to `const_cast`s down the usage chain).

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Can you make sure that at every place this PR touches `const` makes sense? I found out recently that we can be quite good at pretending that something is `const`, all the way down until we realize we need a `const_cast`, because modification is required in that one place.

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++23 %s -ast-dump | FileCheck --check-prefixes=CXX23 %s + +namespace cwg2771 { // cwg2771: 18 + +struct A{ +int a; +void cwg2771(){ + int* r = +} +}; +// CXX23: CXXMethodDecl{{.+}}cwg2771 +// CXX23-NEXT: CompoundStmt

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -240,3 +240,29 @@ void test() { } } #endif + + +#if __cplusplus >= 202302L Endilll wrote: Move `#if` inside `namespace`. https://github.com/llvm/llvm-project/pull/93430 ___ cfe-commits mailing list

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -240,3 +240,29 @@ void test() { } } #endif + + +#if __cplusplus >= 202302L +namespace cwg2692 { // cwg2692: 19 + + struct A { +static void f(A); // #cwg2692-1 +void f(this A); // #cwg2692-2 + +void g(); + }; + + void A::g() { +(::f)(A()); // expected-error

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-05-27 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++23 %s -ast-dump | FileCheck --check-prefixes=CXX23 %s + +namespace cwg2771 { // cwg2771: 18 + +struct A{ +int a; +void cwg2771(){ + int* r = Endilll wrote: You can use `#pragma clang __debug dump ` to

[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM https://github.com/llvm/llvm-project/pull/93338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-26 Thread Vlad Serebrennikov via cfe-commits
@@ -5153,6 +5153,12 @@ class Sema final : public SemaBase { return ExprEvalContexts.back(); }; + ExpressionEvaluationContextRecord () { +assert(ExprEvalContexts.size() >= 2 && + "Must be in an expression evaluation context"); +return

[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-25 Thread Vlad Serebrennikov via cfe-commits
@@ -17693,12 +17691,13 @@ void Sema::PopExpressionEvaluationContext() { // Append the collected materialized temporaries into previous context before // exit if the previous also is a lifetime extending context. - auto = ExprEvalContexts[ExprEvalContexts.size() - 2]; +

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/17] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + Endilll wrote: > 1. It's not parallelized anymore

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/16] [clang][ci] Move libc++ testing into the main PR

[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

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

[clang] [clang] In Sema use new parentEvaluationContext function (PR #93338)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > You may want to have someone double-checkout those new libcxx jobs. Sure. libc++ jobs are not really new: I basically copied them over from https://github.com/llvm/llvm-project/blob/b9d40a7ae4b3e5b9829eca8a497637c9fab6dd3e/clang/utils/ci/run-buildbot#L94-L147

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Can we also delete > https://github.com/llvm/llvm-project/blob/main/clang/utils/ci/buildkite-pipeline.yml Done. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/13] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll ready_for_review https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
@@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" Endilll

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/12] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: https://buildkite.com/llvm-project/github-pull-requests/builds/67044#018fab83-257d-446a-9ec2-3faab776dfa8 has both new additions and `clang-ci` run at the same time. `clang-ci` took 15 minutes, Linux run of GitHub Pull requests pipeline that does what `clang-ci` does on top of

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/10] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/9] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/8] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/7] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/6] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/5] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/4] [clang][ci] Move libc++ testing into the main PR

[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)

2024-05-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/3] [clang][ci] Move libc++ testing into the main PR

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/93233 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -1213,6 +1213,197 @@ static bool isRemark(const Record ) { return ClsName == "CLASS_REMARK"; } +// Presumes the text has been split at the first whitespace or hyphen. +static bool isExemptAtStart(StringRef Text) { + // Fast path, the first character is lowercase or not

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. OK, I'll try to add this testing to "GitHub Pull Requests" later so that we can avoid building Clang twice. https://github.com/llvm/llvm-project/pull/93233 ___ cfe-commits mailing list

[clang] [clang][ci] Remove unnecessary BuildKite jobs for Clang (PR #93233)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Do we even need to build Clang and run libc++ jobs? I don't even see them linked in libc++ PR, even besides the fact that I think libc++ is fully tested with GitHub Actions. https://github.com/llvm/llvm-project/pull/93233 ___

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -1213,6 +1213,194 @@ static bool isRemark(const Record ) { return ClsName == "CLASS_REMARK"; } +// Presumes the text has been split at the first whitespace or hyphen. +static bool isExemptAtStart(StringRef Text) { + // Fast path, the first character is lowercase or not

[clang] [clang] Diagnose problematic diagnostic messages (PR #93229)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -1213,6 +1213,194 @@ static bool isRemark(const Record ) { return ClsName == "CLASS_REMARK"; } +// Presumes the text has been split at the first whitespace or hyphen. +static bool isExemptAtStart(StringRef Text) { + // Fast path, the first character is lowercase or not

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > FYI this causes a minor compile-time improvement in stage1 builds using gcc: > https://llvm-compile-time-tracker.com/compare.php?from=32c3561d44aa792ef08d72b5a4c342c9965bc4c2=4feae05c6abda364a9295aecfa600d7d4e7dfeb6=instructions:u > While that's nice, it does suggest that the

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/93190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Fix more diagnostic wording for style; NFC (PR #93190)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -10362,12 +10362,12 @@ def err_shufflevector_argument_too_large : Error< "index for __builtin_shufflevector must be less than the total number " "of vector elements">; def err_shufflevector_minus_one_is_undefined_behavior_constexpr : Error< - "index for

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types Endilll wrote: We decided that there's nothing to change here after an offline discussion.

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Quite expectedly, I see buildbot failures. Working on them. https://lab.llvm.org/buildbot/#/builders/36/builds/45836 https://lab.llvm.org/buildbot/#/builders/57/builds/35200 https://github.com/llvm/llvm-project/pull/92953 ___

  1   2   3   4   5   6   7   8   9   10   >