[clang] [libclang/python] Fix `get_exception_specification_kind` (PR #101548)

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

[clang] [libclang/python] Fix `get_exception_specification_kind` (PR #101548)

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

[clang] [libclang/python] Fix `get_exception_specification_kind` (PR #101548)

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

[clang] [libclang/python] Fix get_exception_specification_kind (PR #101548)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll I found another bug on the way, so here's a fix+test. Does this need > a release note under `Python Binding Changes`? Yes, the general approach is that every change should come with a test and a release note. On a different note, I wonder if there's a way to prevent

[clang] 5ad15e5 - [clang][NFC] Update `cxx_dr_status.html`

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-08-01T18:01:10+03:00 New Revision: 5ad15e58136bc80eadcc0a7fceb463bbb5317345 URL: https://github.com/llvm/llvm-project/commit/5ad15e58136bc80eadcc0a7fceb463bbb5317345 DIFF:

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: /cherry-pick 5d7357cc9ee84578e7142c5fa7c03b1331cba6d2 https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: /cherry-pick https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

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

[clang] [clang] Add test for CWG2091 "Deducing reference non-type template arguments" (PR #100765)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/100765 >From 22b2d8972b06cce2d97abc3f07b62aca52ece67c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 26 Jul 2024 18:43:18 +0300 Subject: [PATCH] [clang] Add test for CWG2091 "Deducing reference non-type

[clang] [clang] Fix crash with multiple non-parenthsized `sizeof` (PR #101297)

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

[clang] [clang] Fix crash with multiple non-parenthsized `sizeof` (PR #101297)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Testing for stack exhaustion is always a challenge and so it is reasonable > for this to not come with a test case. However, did you manually verify that > it fixes the crash for you? Yes, the test I originally included wasn't passing without my fix, but passed with my fix

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

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

[clang] [clang] Fix crash with multiple non-parenthsized `sizeof` (PR #101297)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101297 >From d75b3cef41c370fef939a347935a4f3ed53c46ea Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 31 Jul 2024 10:29:04 +0300 Subject: [PATCH 1/4] [clang] Fix crash with multiple non-parenthsized

[clang] [clang][NFC] Add CWG882 test (Defining `main` as deleted) (PR #101382)

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

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Still need to add tests for [CWG > 2917](https://cplusplus.github.io/CWG/issues/2917.html), which I filed while > working on this, to the DR test suite proper. (@Endilll Sorry for asking this > again, but do I need to run the script that updates the DR tests as part of >

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-07-31 Thread Vlad Serebrennikov via cfe-commits
@@ -160,6 +160,9 @@ Bug Fixes in This Version Bug Fixes to Compiler Builtins ^^ +- ``__is_layout_compatible`` no longer requires the empty bases to be the same in two + standard-layout classes. It now only compares non-static data members.

[clang] [clang][NFC] Add CWG882 test (Defining `main` as deleted) (PR #101382)

2024-07-31 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Do you want this to be merged once CI passes? https://github.com/llvm/llvm-project/pull/101382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Add CWG882 test (Defining `main` as deleted) (PR #101382)

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

[clang] [clang][NFC] Add CWG882 test (Defining `main` as deleted) (PR #101382)

2024-07-31 Thread Vlad Serebrennikov via cfe-commits
@@ -30,3 +30,8 @@ void g(int i) { } #endif } // namespace cwg873 + +// cwg882: 3.5 +int main() = delete; +// expected-error@-1 {{'main' is not allowed to be deleted}} +// cxx98-error@-2 {{deleted function definitions are a C++11 extension}} Endilll wrote:

[clang] [clang][NFC] Add CWG882 test (Defining `main` as deleted) (PR #101382)

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

[clang] [clang][NFC] Add CWG882 test (Defining `main` as deleted) (PR #101382)

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

[clang] [libclang/python] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-07-31 Thread Vlad Serebrennikov via cfe-commits
@@ -255,71 +263,75 @@ class SourceLocation(Structure): """ _fields_ = [("ptr_data", c_void_p * 2), ("int_data", c_uint)] -_data = None +_data: tuple[File | None, int, int, int] | None = None -def _get_instantiation(self): +def

[clang] [libclang/python] type-ignore `Any` returns from library calls (PR #101310)

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

[clang] [libclang/python] type-ignore `Any` returns from library calls (PR #101310)

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

[clang] [libclang/python] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-07-31 Thread Vlad Serebrennikov via cfe-commits
@@ -3257,21 +3323,21 @@ def reparse(self, unsaved_files=None, options=0): if unsaved_files is None: unsaved_files = [] -unsaved_files_array = 0 +unsaved_files_array: int | Array[_CXUnsavedFile] = 0 if len(unsaved_files):

[clang] [libclang/python] Factor out unsaved files processing (PR #101308)

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

[clang] [libclang/python] Factor out unsaved files processing (PR #101308)

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

[clang] [clang] Fix crash with multiple non-parenthsized `sizeof` (PR #101297)

2024-07-31 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101297 >From d75b3cef41c370fef939a347935a4f3ed53c46ea Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 31 Jul 2024 10:29:04 +0300 Subject: [PATCH 1/3] [clang] Fix crash with multiple non-parenthsized

[clang] Fix coverage when `/fo` is used (PR #88201)

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

[clang] [clang] Fix crash with multiple non-parenthsized `sizeof` (PR #101297)

2024-07-31 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101297 >From d75b3cef41c370fef939a347935a4f3ed53c46ea Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 31 Jul 2024 10:29:04 +0300 Subject: [PATCH 1/3] [clang] Fix crash with multiple non-parenthsized

[clang] [clang] Fix crash with multiple non-parenthsized `sizeof` (PR #101297)

2024-07-31 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101297 >From d75b3cef41c370fef939a347935a4f3ed53c46ea Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 31 Jul 2024 10:29:04 +0300 Subject: [PATCH 1/2] [clang] Fix crash with multiple non-parenthsized

[clang] [clang] Fix crash with multiple non-parenthsized `sizeof` (PR #101297)

2024-07-31 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/101297 There are 5 unary operators that can be followed by a non-parenthesized expression: `sizeof`, `__datasizeof`, `__alignof`, `alignof`, `_Alignof`. When we nest them too deep, `BalancedDelimiterTracker` does not

[clang] [libclang/python] Add strict typing to clang Python bindings (#76664) (PR #78114)

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

[clang] [libclang/python] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-07-30 Thread Vlad Serebrennikov via cfe-commits
@@ -3257,21 +3323,21 @@ def reparse(self, unsaved_files=None, options=0): if unsaved_files is None: unsaved_files = [] -unsaved_files_array = 0 +unsaved_files_array: int | Array[_CXUnsavedFile] = 0 if len(unsaved_files):

[clang] [libclang/python] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-07-30 Thread Vlad Serebrennikov via cfe-commits
@@ -255,71 +263,75 @@ class SourceLocation(Structure): """ _fields_ = [("ptr_data", c_void_p * 2), ("int_data", c_uint)] -_data = None +_data: tuple[File | None, int, int, int] | None = None -def _get_instantiation(self): +def

[clang] [libclang/python] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-07-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `+471 −397` is still a bit too much to my liking. I think there's a way for further splitting. I left comments about possible direction. https://github.com/llvm/llvm-project/pull/78114 ___ cfe-commits mailing

[clang] Ofast deprecation clarifications (PR #101005)

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

[clang] Ofast deprecation clarifications (PR #101005)

2024-07-29 Thread Vlad Serebrennikov via cfe-commits
@@ -429,8 +429,12 @@ Code Generation Options :option:`-Ofast` Enables all the optimizations from :option:`-O3` along with other aggressive optimizations that may violate strict compliance with -language standards. This is deprecated in favor of :option:`-O3` -

[clang] [libclang/python] Export all enums (PR #100941)

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

[clang] [libclang/python] Export all enums (PR #100941)

2024-07-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > @tbaederr CI for this patch has failed due to unrelated failure that is > > likely to be connected to your work: > > That should be fixed already, I assume this is using an old version of the > test. Sure, but it's annoying then you make a branch from `main`, only to find

[clang] [libclang/python] Export all enums (PR #100941)

2024-07-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @DeinAlptraum Can you merge `main` into this branch? I'd like to merge this with a green CI. @tbaederr CI for this patch has failed due to unrelated failure that is likely to be connected to your work: ``` _bk;t=1722188500258 TEST 'Clang ::

[clang] [libclang/python] Export all enums (PR #100941)

2024-07-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM I think `__all__` can be made a tuple instead, but it's not necessarily in the scope of this PR. https://github.com/llvm/llvm-project/pull/100941 ___ cfe-commits mailing list

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-07-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Shafik contacted me offline about a libc++ test failure this PR causes. The test in question is `mem.res.eq/not_equal_pass.cpp`. I reduced it down to the following: ```cpp struct memory_resource { virtual ~memory_resource(); bool is_equal(const memory_resource &) const

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

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

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > New test compiles down to clang 3.0 (except warnings for > https://cplusplus.github.io/CWG/issues/547.html) but do not compile before > that because of the lack of `__is_const`/`__is_volatile` type traits. > > Function types with cv- qualifiers were added for Clang 2.5 in >

[clang] [clang] Add test for CWG2091 "Deducing reference non-type template arguments" (PR #100765)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Ideally we should wait for #97200 to land first, then update this PR with the output of `make_cxx_dr_status`. https://github.com/llvm/llvm-project/pull/100765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
@@ -71,6 +76,17 @@ namespace cwg712 { // cwg712: partial #endif } +namespace cwg713 { // cwg713: yes Endilll wrote: Please check how just released Clang 19.1-rc1 handles this test, and choose between 19 and 20 accordingly.

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

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

[clang] [clang][Tests][NFC] Add CWG713 test; add example from CWG1584 test (PR #100747)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Also, I would think since the resolution is purely editorial (it just changes > notes, nothing normative), it would be considered implemented in any clang > version? The question "availability" answers is "What is the first Clang version that exhibits the correct behavior?",

[clang] [Clang] Qualified functions can't decay into pointers (PR #90353)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
@@ -71,6 +76,17 @@ namespace cwg712 { // cwg712: partial #endif } +namespace cwg713 { // cwg713: yes +static_assert(!__is_const(void()const), ""); +static_assert(!__is_const(void()const&), ""); +// cxx98-error@-1 {{reference qualifiers on functions are a C++11 extension}}

[clang] [Clang] Qualified functions can't decay into pointers (PR #90353)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
@@ -71,6 +76,17 @@ namespace cwg712 { // cwg712: partial #endif } +namespace cwg713 { // cwg713: yes Endilll wrote: Please, run your test through various Clang versions before claiming availability. In this case, this is rejected by 18, but accepted on

[clang] [Clang] Qualified functions can't decay into pointers (PR #90353)

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Current CWG713 behavior was introduced sometime after Clang 18, and is not affected by this patch. Current CWG1584 behavior was introduced in Clang 7, and is also not affected by this patch. (https://godbolt.org/z/xYec9rP5x) This PR is large enough

[clang] [Clang] Qualified functions can't decay into pointers (PR #90353)

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

[clang-tools-extra] 88549cf - [clang-doc] Disable flaky test `basic-project.test`

2024-07-26 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-07-26T13:15:35+03:00 New Revision: 88549cf47cafc4c4a6042393ee07fc2dc20566cc URL: https://github.com/llvm/llvm-project/commit/88549cf47cafc4c4a6042393ee07fc2dc20566cc DIFF:

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/100393 >From 772b5d85dff73de9f6a01a266bd201cbe04923ab Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 24 Jul 2024 17:38:50 +0300 Subject: [PATCH 1/5] [clang] Impement `__is_virtual_base_of()` intrinsic

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @PeterChou1 I see you had landed `clang-doc` patches recently. Can you help? CI is repeatedly failing on the following `clang-doc` test: ``` _bk;t=1721926993260 TEST 'Clang Tools :: clang-doc/basic-project.test' FAILED

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/100393 >From 772b5d85dff73de9f6a01a266bd201cbe04923ab Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 24 Jul 2024 17:38:50 +0300 Subject: [PATCH 1/5] [clang] Impement `__is_virtual_base_of()` intrinsic

[clang] [clang] Remove `__is_layout_compatible` from revertible type traits list (PR #100572)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: /cherry-pick 3295d377f37a60597321f502d164b5d6b1948e28 https://github.com/llvm/llvm-project/pull/100572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove `__is_layout_compatible` from revertible type traits list (PR #100572)

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

[clang] [clang] Remove `__is_layout_compatible` from revertible type traits list (PR #100572)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Should we also rename to __builtin_is_layout_compatible? Yeah, but not in this patch. https://github.com/llvm/llvm-project/pull/100572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/100393 >From 772b5d85dff73de9f6a01a266bd201cbe04923ab Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 24 Jul 2024 17:38:50 +0300 Subject: [PATCH 1/5] [clang] Impement `__is_virtual_base_of()` intrinsic

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/100393 >From 772b5d85dff73de9f6a01a266bd201cbe04923ab Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 24 Jul 2024 17:38:50 +0300 Subject: [PATCH 1/5] [clang] Impement `__is_virtual_base_of()` intrinsic

[clang] [clang] Remove `__is_layout_compatible` from revertible type traits list (PR #100572)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll milestoned https://github.com/llvm/llvm-project/pull/100572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove `__is_layout_compatible` from revertible type traits list (PR #100572)

2024-07-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/100572 `__is_layout_compatible` was added in Clang 19 (#81506), and at that time it wasn't entirely clear whether it should be a revertible type trait or not. We decided to follow the example of other type traits.

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -6027,6 +6027,33 @@ static bool EvaluateBinaryTypeTrait(Sema , TypeTrait BTT, const TypeSourceI return cast(rhsRecord->getDecl()) ->isDerivedFrom(cast(lhsRecord->getDecl())); } + case BTT_IsVirtualBaseOf: { +const RecordType *BaseRecord = LhsT->getAs(); +

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -6027,6 +6027,33 @@ static bool EvaluateBinaryTypeTrait(Sema , TypeTrait BTT, const TypeSourceI return cast(rhsRecord->getDecl()) ->isDerivedFrom(cast(lhsRecord->getDecl())); } + case BTT_IsVirtualBaseOf: { +const RecordType *BaseRecord = LhsT->getAs(); +

[clang] [libcxx] Reapply "[Clang] Implement resolution for CWG1835 (#92957, #98547)" (PR #100425)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -628,10 +628,12 @@ namespace cwg141 { // cwg141: 3.1 // expected-error@-1 {{use 'template' keyword to treat 'f' as a dependent template name}} } void h() { - (void)t.S::n; // ok + (void)t.S::n; Endilll wrote: Makes sense, thank

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -6027,6 +6027,33 @@ static bool EvaluateBinaryTypeTrait(Sema , TypeTrait BTT, const TypeSourceI return cast(rhsRecord->getDecl()) ->isDerivedFrom(cast(lhsRecord->getDecl())); } + case BTT_IsVirtualBaseOf: { +const RecordType *BaseRecord = LhsT->getAs(); +

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Can you update LanguageExtensions.rst? Done. https://github.com/llvm/llvm-project/pull/100393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -822,6 +822,7 @@ bool Parser::isRevertibleTypeTrait(const IdentifierInfo *II, REVERTIBLE_TYPE_TRAIT(__is_unbounded_array); REVERTIBLE_TYPE_TRAIT(__is_union); REVERTIBLE_TYPE_TRAIT(__is_unsigned); +REVERTIBLE_TYPE_TRAIT(__is_virtual_base_of);

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -2457,6 +2457,75 @@ void is_base_of() { static_assert(!__is_base_of(DerivedB, BaseA)); } +struct DerivedTransitiveViaNonVirtual : Derived3 {}; +struct DerivedTransitiveViaVirtual : virtual Derived3 {}; + +template +struct CrazyDerivedVirtual : virtual T {}; + +struct

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/100393 >From 772b5d85dff73de9f6a01a266bd201cbe04923ab Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 24 Jul 2024 17:38:50 +0300 Subject: [PATCH 1/2] [clang] Impement `__is_virtual_base_of()` intrinsic

[clang] [clang] Implement `__is_virtual_base_of()` intrinsic (PR #100393)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -6027,6 +6027,33 @@ static bool EvaluateBinaryTypeTrait(Sema , TypeTrait BTT, const TypeSourceI return cast(rhsRecord->getDecl()) ->isDerivedFrom(cast(lhsRecord->getDecl())); } + case BTT_IsVirtualBaseOf: { +const RecordType *BaseRecord = LhsT->getAs(); +

[clang] [libcxx] Reapply "[Clang] Implement resolution for CWG1835 (#92957, #98547)" (PR #100425)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Except for the comment I left, `Sema.h` and DR test changes look good. https://github.com/llvm/llvm-project/pull/100425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [libcxx] Reapply "[Clang] Implement resolution for CWG1835 (#92957, #98547)" (PR #100425)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -628,10 +628,12 @@ namespace cwg141 { // cwg141: 3.1 // expected-error@-1 {{use 'template' keyword to treat 'f' as a dependent template name}} } void h() { - (void)t.S::n; // ok + (void)t.S::n; Endilll wrote: Previously this was

[clang] [libcxx] Reapply "[Clang] Implement resolution for CWG1835 (#92957, #98547)" (PR #100425)

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

[clang] [Clang] Check explicit object parameter for defaulted operators properly (PR #100419)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to DR tests look good otherwise. https://github.com/llvm/llvm-project/pull/100419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Check explicit object parameter for defaulted operators properly (PR #100419)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -92,6 +92,26 @@ using ::cwg2521::operator""_div; #endif } // namespace cwg2521 +namespace cwg2547 { // cwg2547: 20 +#if __cplusplus >= 202302L +struct S; // since-cxx23-note 3 {{forward declaration of 'cwg2547::S'}} +bool operator==(S, S) = default; // error: S is not

[clang] [Clang] Check explicit object parameter for defaulted operators properly (PR #100419)

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

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -139,7 +139,7 @@ struct D3 : B { #endif #if __cplusplus >= 202302L -namespace cwg2561 { // cwg2561: no tentatively ready 2024-03-18 +namespace cwg2561 { // cwg2561: no ready 2024-06-25 Endilll wrote: Jens confirmed that GH pages are not supposed to

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Looks good to me. I hope that `make_cxx_dr_status` script is also happy. Thank you for seeing this through! https://github.com/llvm/llvm-project/pull/97200 ___ cfe-commits mailing list

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -139,7 +139,7 @@ struct D3 : B { #endif #if __cplusplus >= 202302L -namespace cwg2561 { // cwg2561: no tentatively ready 2024-03-18 +namespace cwg2561 { // cwg2561: no ready 2024-06-25 Endilll wrote: > I may have been reading some stale info if that is

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -139,7 +139,7 @@ struct D3 : B { #endif #if __cplusplus >= 202302L -namespace cwg2561 { // cwg2561: no tentatively ready 2024-03-18 +namespace cwg2561 { // cwg2561: no ready 2024-06-25 Endilll wrote: I sent Jens an email. Hopefully this will be fixed, or

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -139,7 +139,7 @@ struct D3 : B { #endif #if __cplusplus >= 202302L -namespace cwg2561 { // cwg2561: no tentatively ready 2024-03-18 +namespace cwg2561 { // cwg2561: no ready 2024-06-25 Endilll wrote: Hmm, https://cplusplus.github.io/CWG/issues/2561.html

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

2024-07-24 Thread Vlad Serebrennikov via cfe-commits
@@ -139,7 +139,7 @@ struct D3 : B { #endif #if __cplusplus >= 202302L -namespace cwg2561 { // cwg2561: no tentatively ready 2024-03-18 +namespace cwg2561 { // cwg2561: no ready 2024-06-25 Endilll wrote: We need a date to understand what are we testing

[clang] [PAC] Define __builtin_ptrauth_type_discriminator (PR #100204)

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

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-23 Thread Vlad Serebrennikov via cfe-commits
@@ -4856,7 +4856,7 @@ bool TemplateDeclInstantiator::SubstDefaultedFunction(FunctionDecl *New, : DFI); } - SemaRef.SetDeclDefaulted(New, Tmpl->getLocation()); + SemaRef.SetDeclDefaulted(nullptr, New, Tmpl->getLocation()); Endilll

[clang] [clang] Add deprecation warning for `-Ofast` driver option (PR #98736)

2024-07-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > This seems to break tests on my Windows box: > http://45.33.8.238/win/91548/step_6.txt This is the failed test: ``` c:\src\llvm-project\out\gn\bin\clang.exe -Ofast -O2 -### -Werror C:\src\llvm-project\clang\test\Driver\Ofast.c 2>&1 |

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-22 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only %s +// expected-no-diagnostics +struct X {}; +namespace NS { +bool operator==(X, X); +} +using namespace NS; +struct Y { +X x; +friend bool operator==(Y, Y); +}; +bool operator==(Y, Y) = default;

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > It looks like my release note has conflict. > Should I edit the file through `resolve conflits` and hit `commit merge`? Conflicts in release notes are very typical. You can resolve them in any way you prefer. https://github.com/llvm/llvm-project/pull/99542

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-22 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only %s +// expected-no-diagnostics +struct X {}; +namespace NS { +bool operator==(X, X); +} +using namespace NS; +struct Y { +X x; +friend bool operator==(Y, Y); +}; +bool operator==(Y, Y) = default;

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-20 Thread Vlad Serebrennikov via cfe-commits
@@ -169,25 +198,32 @@ def __init__(self, enumeration, message): ### Structures and Utility Classes ### +TInstance = TypeVar("TInstance") +TResult = TypeVar("TResult") + -class CachedProperty: +class CachedProperty(Generic[TInstance, TResult]): """Decorator that

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-20 Thread Vlad Serebrennikov via cfe-commits
@@ -200,13 +236,16 @@ class _CXString(Structure): _fields_ = [("spelling", c_char_p), ("free", c_int)] -def __del__(self): +def __del__(self) -> None: conf.lib.clang_disposeString(self) @staticmethod -def from_result(res, fn=None, args=None):

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-20 Thread Vlad Serebrennikov via cfe-commits
@@ -115,9 +146,7 @@ def b(x): # object. This is a problem, because it means that from_parameter will see an # integer and pass the wrong value on platforms where int != void*. Work around # this by marshalling object arguments as void**. -c_object_p = POINTER(c_void_p) -

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

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

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Looks good aside from missing release notes, especially entries to potentially breaking changes. Given that you've been making a significant amount of changes to Python bindings that are spread over multiple PRs, it's worth considering if

[clang] [libclang/python] Fix some type errors, add type annotations (PR #98745)

2024-07-20 Thread Vlad Serebrennikov via cfe-commits
@@ -66,46 +66,77 @@ import collections.abc import os +import sys from enum import Enum +from typing import ( +Any, +Callable, +Generic, +Optional, +Type as TType, +TypeVar, +TYPE_CHECKING, +Union as TUnion, +) +from typing_extensions import

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for working on this! You should add one or more tests under `clang/test/SemaCXX`. You should also add an entry to `clang/doc/ReleaseNotes.rst`. https://github.com/llvm/llvm-project/pull/99542 ___

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-19 Thread Vlad Serebrennikov via cfe-commits
@@ -891,6 +898,12 @@ class Sema final : public SemaBase { SourceLocation NewLoc, SourceLocation OldLoc); + /// Potentially add a FunctionDecl or BlockDecl to DeclsWithEffectsToVerify. + void

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

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

  1   2   3   4   5   6   7   8   9   10   >