[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
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] [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] 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 > this

[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] 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 `sizeo

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

[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] 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] [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] [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
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] 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: https://github.com/llvm/llvm-project/commit/5ad15e58136bc80eadcc0a7fceb463bbb5317345.

[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] [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-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 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
Endilll wrote: > Could you merge this for me? Done. > On related note, do you think my contributions would count for "a track > record of submitting high quality patches", i.e. should I apply for commit > access? You have unread messages in Discord :) https://github.com/llvm/llvm-project/pu

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

2024-08-02 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] Add test for CWG2091 "Deducing reference non-type template arguments" (PR #100765)

2024-08-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > [200](https://github.com/llvm/llvm-project/pull/97200) to land first, then > update this PR with the output of `make_cxx_dr_status`. This is done. https://github.com/llvm/llvm-project/pull/100765 ___ cfe-commits mailing list cfe-comm

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/101807 This intrinsic supports [P2647R1](https://wg21.link/p2674r1) "A trait for implicit lifetime types". >From 9c4e7ccf47d5ede2b6169effb2a09668f512a182 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 3

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-03 Thread Vlad Serebrennikov via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

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

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

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

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-08-03 Thread Vlad Serebrennikov via cfe-commits
@@ -54,6 +54,8 @@ LLVM_13 { clang_Cursor_Evaluate; clang_Cursor_getArgument; clang_Cursor_getBriefCommentText; +clang_Cursor_getBinaryOpcode; +clang_Cursor_getBinaryOpcodeStr; Endilll wrote: This is symbol versioning, which allows us to upd

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101807 >From 9c4e7ccf47d5ede2b6169effb2a09668f512a182 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 3 Aug 2024 13:05:21 +0300 Subject: [PATCH 1/2] [clang] Implement `__builtin_is_implicit_lifetime()` Th

[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)

2024-08-03 Thread Vlad Serebrennikov via cfe-commits
@@ -54,6 +54,8 @@ LLVM_13 { clang_Cursor_Evaluate; clang_Cursor_getArgument; clang_Cursor_getBriefCommentText; +clang_Cursor_getBinaryOpcode; +clang_Cursor_getBinaryOpcodeStr; Endilll wrote: Make sure to fix this on `main` first, then we ca

[clang] [libclang] Move getBinaryOpcode library functions to LLVM 19 (PR #101820)

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

[clang] [libclang] Fix symbol version of `getBinaryOpcode` functions (PR #101820)

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

[clang] [libclang] Fix symbol version of `getBinaryOpcode` functions (PR #101820)

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

[clang] [libclang] Fix symbol version of `getBinaryOpcode` functions (PR #101820)

2024-08-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I wrote a description to provide readers some context. In general PRs without descriptions are discouraged. Hope you don't mind. https://github.com/llvm/llvm-project/pull/101820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [libclang] Fix symbol version of `getBinaryOpcode` functions (PR #101820)

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

[clang] [libclang] Fix symbol version of `getBinaryOpcode` functions (PR #101820)

2024-08-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The failure is not related to this PR ``` [7756/8607] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Clauses.cpp.o FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Clauses.cpp.o /home/tcwg-buildbot/worker/clang-aarch64-sve-vla-2stage/

[clang] [libclang] Fix symbol version of `getBinaryOpcode` functions (PR #101820)

2024-08-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This one is the same, consequently not related: ``` [7789/8607] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Clauses.cpp.o FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Clauses.cpp.o /home/tcwg-buildbot/worker/clang-aarch64-sve-v

[clang] Fix all mypy --strict errors in clang python binding (PR #101784)

2024-08-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Thank you for your contribution! This is somewhat tricky situation, now that we have multiple opened PR in the same area of the codebase. But I think there is way forward: 1. https://github.com/llvm/llvm-project/pull/78114 and related work has been underway for several weeks, a

[clang] [Clang] SFINAE on mismatching pack length during constraint satisfaction checking (PR #101879)

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

[clang] [Clang] SFINAE on mismatching pack length during constraint satisfaction checking (PR #101879)

2024-08-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > The intent is for this to be backported to 19 (therefore no changelog) Yes, this is very important to backport. https://github.com/llvm/llvm-project/pull/101879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

2024-08-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes LGTM https://github.com/llvm/llvm-project/pull/101857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-04 Thread Vlad Serebrennikov via cfe-commits
@@ -86,6 +86,9 @@ C++23 Feature Support C++2c Feature Support ^ +- Add ``__builtin_is_implicit_lifetime`` intrinsic, which supports Endilll wrote: See #98310 https://github.com/llvm/llvm-project/pull/101807 ___

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

2024-08-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/100765 ___ 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-08-06 Thread Vlad Serebrennikov via cfe-commits
@@ -64,48 +64,80 @@ from ctypes import * -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, +) + +if TY

[clang] #101784 part 1: introduce ctyped in an independent manner (PR #101941)

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

[clang] #101784 part 1: introduce ctyped in an independent manner (PR #101941)

2024-08-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for splitting that large PR into something smaller. That said, 1.6k lines of changes is no small change either. This PR needs more high-level explanation of what you try to achieve and how. At the moment I'm not sold we want to go in this directio

[clang] #101784 part 1: introduce ctyped in an independent manner (PR #101941)

2024-08-06 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I don't see value in annotating exported C functions themselves (`binder.py`), because they are wrapped by `cindex.py`. From maintenance perspective I'd rather leave `# type: ignore` at the call sites of those functions, than accept a whole new

[clang] #101784 part 1: introduce ctyped in an independent manner (PR #101941)

2024-08-06 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This file seems to implement a whole abstraction layer for annotations. I'd like to understand what the benefits are, because I see a non-trivial amount of complexity here. https://github.com/llvm/llvm-project/pull/101941 __

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

2024-08-06 Thread Vlad Serebrennikov via cfe-commits
@@ -64,48 +64,80 @@ from ctypes import * -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, +) + +if TY

[clang] [Clang] Backport P2741R3 (static_assert with user-generated message) to C++11 (PR #102044)

2024-08-06 Thread Vlad Serebrennikov via cfe-commits
@@ -134,7 +134,7 @@ void test() { } namespace cwg2798 { // cwg2798: 17 -#if __cpp_static_assert >= 202306 +#if __cplusplus > 202302L Endilll wrote: Yeah, checking for `__cplusplus` makes more sense in DR test suite. But I wonder if we can leverage feature tes

[clang] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-06 Thread Vlad Serebrennikov via cfe-commits
@@ -671,10 +671,8 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, LangOpts.CPlusPlus23 ? "202211L" : LangOpts.CPlusPlus17 ? "201603L" : "200907");

[clang] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)

2024-08-06 Thread Vlad Serebrennikov via cfe-commits
@@ -671,10 +671,8 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, LangOpts.CPlusPlus23 ? "202211L" : LangOpts.CPlusPlus17 ? "201603L" : "200907");

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-07 Thread Vlad Serebrennikov via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] #101784 part 1: introduce ctyped in an independent manner (PR #101941)

2024-08-07 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I've been staring at `cindex.py` for the better part of yesterday and today. I'll try to describe the status quo as I understand it first, to make sure all three of us are on the same page, then I'll describe the direction I think we should take. Status quo 1. I be

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-07 Thread Vlad Serebrennikov via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] #101784 part 1: introduce ctyped in an independent manner (PR #101941)

2024-08-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think this can be prevented by addition testing. Feel free to submit your suggestion as an additional test. I also saw declared, but unused symbols in `functionList`, e.g. `clang_getTemplateCursorKind`. That might be worth loo https://github.com/llvm/llvm-project/pull/101941 _

[clang] #101784 part 1: introduce ctyped in an independent manner (PR #101941)

2024-08-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Good point about the restype for clang_Cursor_getTemplateArgumentKind though, > I didn't notice and we should probably change that Yes, I'd like us to stop relying on that for the same reason I don't like `errcheck`. The fact that it's deprecated further adds to it. > I don't

[clang] 27d37ee - [clang][NFC] Clean up `Sema` headers

2024-08-17 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-08-17T14:57:59+03:00 New Revision: 27d37ee4d067f42e9a46a0871d3cb961323e5c85 URL: https://github.com/llvm/llvm-project/commit/27d37ee4d067f42e9a46a0871d3cb961323e5c85 DIFF: https://github.com/llvm/llvm-project/commit/27d37ee4d067f42e9a46a0871d3cb961323e5c85.

[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

2024-08-17 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @MitalAshok Is there anything left to do here? https://github.com/llvm/llvm-project/pull/94118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

2024-08-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/94118 ___ 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-08-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @davidstone Do you plan to get back to this PR? https://github.com/llvm/llvm-project/pull/93493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Un-constify `MultiLevelTemplateArgumentList` (PR #104687)

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

[clang] [clang-tools-extra] [clang][NFC] Un-constify `MultiLevelTemplateArgumentList` (PR #104687)

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

[clang] [clang-tools-extra] [clang][NFC] Un-constify `MultiLevelTemplateArgumentList` (PR #104687)

2024-08-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think the main contribution of this patch is showing the extent of the propagation. I personally was surprised this got to `ASTMatchers` and `APValue`. Now that we understand the scope, we can try to draw a line where changes here stop making sense, and do some else where we'd

[clang] [clang-tools-extra] [clang][NFC] Un-constify `MultiLevelTemplateArgumentList` (PR #104687)

2024-08-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'll deal with the formatting later, because I don't want to burden reviewers with more changes than necessary. I also updated the description after fixing clang-tidy build. We've got two more bad `const_cast`s. https://github.com/llvm/llvm-project/pull/104687 __

[clang] [Clang] CWG722: nullptr to ellipses (PR #104704)

2024-08-18 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,56 @@ +// RUN: %clang_cc1 -std=c++98 %s -verify -pedantic-errors +// RUN: %clang_cc1 -std=c++11 %s -verify -pedantic-errors -ast-dump | FileCheck %s +// RUN: %clang_cc1 -std=c++14 %s -verify -pedantic-errors -ast-dump | FileCheck %s +// RUN: %clang_cc1 -std=c++17 %s -

[clang] [Clang] CWG722: nullptr to ellipses (PR #104704)

2024-08-18 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,56 @@ +// RUN: %clang_cc1 -std=c++98 %s -verify -pedantic-errors +// RUN: %clang_cc1 -std=c++11 %s -verify -pedantic-errors -ast-dump | FileCheck %s +// RUN: %clang_cc1 -std=c++14 %s -verify -pedantic-errors -ast-dump | FileCheck %s +// RUN: %clang_cc1 -std=c++17 %s -

[clang] Nameof operator (PR #104777)

2024-08-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think this is a language extensions that requires an RFC on https://discource.llvm.org first. See https://clang.llvm.org/get_involved.html for details. https://github.com/llvm/llvm-project/pull/104777 ___ cfe-commits mailing list cfe-

[clang] [clang] Diagnose functions with too many parameters (PR #104833)

2024-08-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/104833 This patch adds a parser check when a function declaration or function type declaration (in a function pointer declaration, for example) has too many parameters for `FunctionTypeBits::NumParams` to hold. At the

[clang] [clang] Diagnose functions with too many parameters (PR #104833)

2024-08-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/104833 >From 424818620766cedb2770e076ee359afeb0cc14ec Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 19 Aug 2024 19:26:46 +0300 Subject: [PATCH 1/6] Add in-loop check --- clang/include/clang/AST/Type.h

[clang] [clang] Diagnose functions with too many parameters (PR #104833)

2024-08-19 Thread Vlad Serebrennikov via cfe-commits
@@ -9311,6 +9311,9 @@ def note_constinit_missing_here : Note< def err_dimension_expr_not_constant_integer : Error< "dimension expression does not evaluate to a constant unsigned int">; +def err_function_parameter_limit_exceeded : Error< + "too many function parameters; subs

[clang] [clang] Diagnose functions with too many parameters (PR #104833)

2024-08-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/104833 >From 424818620766cedb2770e076ee359afeb0cc14ec Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 19 Aug 2024 19:26:46 +0300 Subject: [PATCH 1/7] Add in-loop check --- clang/include/clang/AST/Type.h

[clang] [clang] Diagnose functions with too many parameters (PR #104833)

2024-08-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll you forgot to update the tests - hence the ci failure Thank you! Should be good to go now https://github.com/llvm/llvm-project/pull/104833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang] [NFC] Introduce `DynamicRecursiveASTVisitor` (PR #105195)

2024-08-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I wonder if we can reduce binary size by simply marking RAV as `visibility("hidden")` https://github.com/llvm/llvm-project/pull/105195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

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

2024-08-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @Sirraide CWG looked at 2917 last week, and changed the status of the issue. Can you revisit your test for it? https://cplusplus.github.io/CWG/issues/2917.html https://github.com/llvm/llvm-project/pull/101448 ___ cfe-commits mailing li

[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)

2024-08-22 Thread Vlad Serebrennikov via cfe-commits
@@ -23,3 +23,29 @@ struct S { friend class C::Nested...; // expected-error {{friend declaration expands pack 'Ts' that is declared it its own template parameter list}} }; } // namespace cwg2917 + +#if __cplusplus >= 202002 + +namespace std { + using size_t = decltype(sizeof

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

2024-08-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Note that there have been additional discussions happening on the new proposed resolution. https://lists.isocpp.org/core/2024/08/16236.php https://github.com/llvm/llvm-project/pull/101448 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [Clang] correct error message when assigning to const reference captured in lambda (PR #105647)

2024-08-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I think this PR moves things in the right direction, but it would be nice to make notes more helpful. https://github.com/llvm/llvm-project/pull/105647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [Clang] correct error message when assigning to const reference captured in lambda (PR #105647)

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

[clang] [Clang] correct error message when assigning to const reference captured in lambda (PR #105647)

2024-08-22 Thread Vlad Serebrennikov via cfe-commits
@@ -189,6 +189,11 @@ namespace ModifyingCapture { [=] { n = 1; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}} }; +const int cn = 0; +// cxx03-cxx11-warning@+1 {{initialized lambda captures are a C++14 extension

[clang] [Clang] correct error message when assigning to const reference captured in lambda (PR #105647)

2024-08-22 Thread Vlad Serebrennikov via cfe-commits
@@ -189,6 +189,11 @@ namespace ModifyingCapture { [=] { n = 1; // expected-error {{cannot assign to a variable captured by copy in a non-mutable lambda}} }; +const int cn = 0; +// cxx03-cxx11-warning@+1 {{initialized lambda captures are a C++14 extension

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

2024-08-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I would recommend creating an issue and see how ewg handles the new > information before reaping out a lot of code. Sure, we don't necessarily need to change our implementation as CWG continues to consider the issue, but we need to update the test and the status for bookkeepi

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

2024-08-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I think the dr test already say "Clang 20 implements 2024-07-30 resolution" > which is correct While I understand what you're referring to (author's claim that the example is nonsense and should be rejected), if you open https://cplusplus.github.io/CWG/issues/2917.html, the o

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

2024-08-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > the date changed. weird! the resolution did not I think it did: https://github.com/cplusplus/CWG/commit/4492036f0958d140ca14fc49ebb2a3a13f75c28c https://github.com/llvm/llvm-project/pull/101448 ___ cfe-commits mailing list cfe-commi

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

2024-08-23 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Jens restored the suggested resolution in https://cplusplus.github.io/CWG/issues/2917.html and even put a date on it in case we need to reference it. I also notified him that in our tests we are referring to proposed and suggested resolution by dates. He also mentioned we can't

[clang] [clang][utils] Remove ClangDataFormat.py for now (PR #96385)

2024-06-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: LGTM > We should eventually develop proper formatters for Clang data-types, but > these are currently not ready. Yes, I'm still working on that in background. LLDB has to have a way to understand custom RTTI we use in AST nodes for statements and types, because adding a vtable

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM > There is also TokenKind: this one does not currently inherit from > BaseEnumeration and is defined somewhat differently, having all its variants > and their IDs as a dictionary in enumerations.py. This seems quite arbitrary > to me, is there any re

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll are you taking a look at this, and/or should I ask other reviewers? It's never a bad idea to add more reviewers, as long as they are relevant. https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-c

[clang] [libclang/python] Refactor enum usage (PR #95608)

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

[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)

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

[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)

2024-06-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: All 3 buildbot failures are unrelated. https://github.com/llvm/llvm-project/pull/68846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Also worth pinging @linux4life798 https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

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

[clang] [clang][FMV] Do not omit explicit default target_version attribute. (PR #96628)

2024-06-25 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/96628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Use range-based for loops (PR #96831)

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

[clang] [clang][NFC] Use range-based for loops (PR #96831)

2024-06-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: This looks good overall, but I have minor suggestions. https://github.com/llvm/llvm-project/pull/96831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang][NFC] Use range-based for loops (PR #96831)

2024-06-27 Thread Vlad Serebrennikov via cfe-commits
@@ -2056,40 +2056,40 @@ void CXXRecordDecl::completeDefinition() { completeDefinition(nullptr); } +static bool hasPureVirtualFinalOverrider( +const CXXRecordDecl &RD, const CXXFinalOverriderMap *FinalOverriders) { + auto ExistsIn = [](const CXXFinalOverriderMap &FinalOv

[clang] [clang][NFC] Move more things out of `SemaChecking.cpp` (PR #96641)

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

[clang] [clang][NFC] Use range-based for loops (PR #96831)

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

[clang] [Clang] Move the builtin workaround logic to the lexer (PR #96097)

2024-06-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/96097 >From b77b2d9b10ad90ee67893904732003bf11eec21d Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 19 Jun 2024 19:47:43 +0200 Subject: [PATCH 1/3] [Clang] Move the builtin workaround logic to the lexer ---

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
@@ -1180,6 +1180,16 @@ void Sema::PrintPragmaAttributeInstantiationPoint() { diag::note_pragma_attribute_applied_decl_here); } +void Sema::DiagnoseExcessPrecision() { + if (NumExcessPrecisionNotSatisfied > 0) { +for (auto &[Loc, Type, Num] : ExcessPrecision

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
@@ -626,6 +626,11 @@ class Sema final : public SemaBase { const llvm::MapVector & getMismatchingDeleteExpressions() const; + std::vector> + ExcessPrecisionNotSatisfied; Endilll wrote: I think all three data members should be moved down to `SemaExpr.

<    13   14   15   16   17   18   19   20   21   22   >