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

[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 cfe-commits@list

[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 :: AST/Interp/lite

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

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

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

[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 _get_instantiation(self)

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

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

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

[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] [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] 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] 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] 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] 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 _get_instantiation(self)

[clang] [clang] Refactor: Move CTAD code from SemaTemplate.cpp to a dedicated file, NFC (PR #98524)

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

[clang] [Bounds Safety][NFC] Add `SemaBoundsSafety` class and move existing Sema checks there (PR #98954)

2024-07-15 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +//=== SemaBoundsSafety.h - Bounds Safety specific routines-*- C++ -*---===// +// +// 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: Apa

[clang] [Bounds Safety][NFC] Add `SemaBoundsSafety` class and move existing Sema checks there (PR #98954)

2024-07-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. Unfortunately, I think this should be held off until we have a bigger picture for the future of `Sema`. I'll elaborate below. If you take a close look at the existing set of `Sema` parts, it's almost entirely comprised of other

[clang] [Bounds Safety][NFC] Add `SemaBoundsSafety` class and move existing Sema checks there (PR #98954)

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

[clang] [Bounds Safety][NFC] Add `SemaBoundsSafety` class and move existing Sema checks there (PR #98954)

2024-07-15 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > If you take a close look at the existing set of `Sema` parts, it's almost > > entirely comprised of other languages or language extensions (from C and > > C++ standpoint) and backends. They were considered natural enough to be > > split off `Sema`, which, among other things,

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

2024-07-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/98736 >From 44b4a682f2b3d7e140f7b1bd124e7aabdbf439ad Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 13 Jul 2024 13:10:25 +0300 Subject: [PATCH 1/2] [clang] Add deprecation warning for `-Ofast` driver opt

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

2024-07-15 Thread Vlad Serebrennikov via cfe-commits
@@ -442,6 +442,9 @@ def warn_drv_deprecated_arg : Warning< def warn_drv_deprecated_arg_no_relaxed_template_template_args : Warning< "argument '-fno-relaxed-template-template-args' is deprecated">, InGroup; +def warn_drv_deprecated_arg_ofast : Warning< + "argument '-Ofast'

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

2024-07-15 Thread Vlad Serebrennikov via cfe-commits
@@ -470,6 +470,9 @@ New Compiler Flags Deprecated Compiler Flags - +- ``-Ofast`` is deprecated in favor of ``-O3``, possibly combined with ``-ffast-math``. Endilll wrote: Fixed. Thank you! https://github.com/llvm/llvm-project/pull/98

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

2024-07-15 Thread Vlad Serebrennikov via cfe-commits
@@ -10,6 +10,7 @@ // RUN: %clang -Ofast -fno-strict-aliasing -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-STRICT-ALIASING %s // RUN: %clang -Ofast -fno-vectorize -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-VECTORIZE %s +// CHECK-OFAST: warning: argument '-

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

2024-07-15 Thread Vlad Serebrennikov via cfe-commits
@@ -931,7 +931,8 @@ def O : Joined<["-"], "O">, Group, def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>, Alias, AliasArgs<["1"]>; def Ofast : Joined<["-"], "Ofast">, Group, - Visibility<[ClangOption, CC1Option, FlangOption]>; + Visibility<[Clan

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

2024-07-15 Thread Vlad Serebrennikov via cfe-commits
@@ -931,7 +931,8 @@ def O : Joined<["-"], "O">, Group, def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>, Alias, AliasArgs<["1"]>; def Ofast : Joined<["-"], "Ofast">, Group, - Visibility<[ClangOption, CC1Option, FlangOption]>; + Visibility<[Clan

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

2024-07-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/98736 >From 44b4a682f2b3d7e140f7b1bd124e7aabdbf439ad Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 13 Jul 2024 13:10:25 +0300 Subject: [PATCH 1/3] [clang] Add deprecation warning for `-Ofast` driver opt

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

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > We are deprecating -Ofast and I would prefer to hint users first at > conforming behaviour -O3 and then as last resort at -O3 with -ffast-math. @tschuett I'm sympathetic to this arguments, but I think it's no less important to tell users in no uncertain terms how to preserve t

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

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/98736 >From 44b4a682f2b3d7e140f7b1bd124e7aabdbf439ad Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 13 Jul 2024 13:10:25 +0300 Subject: [PATCH 1/4] [clang] Add deprecation warning for `-Ofast` driver opt

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

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
@@ -10,31 +10,36 @@ // RUN: %clang -Ofast -fno-strict-aliasing -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-STRICT-ALIASING %s // RUN: %clang -Ofast -fno-vectorize -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-VECTORIZE %s +// CHECK-OFAST: argument '-Ofast'

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

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
@@ -442,6 +442,9 @@ def warn_drv_deprecated_arg : Warning< def warn_drv_deprecated_arg_no_relaxed_template_template_args : Warning< "argument '-fno-relaxed-template-template-args' is deprecated">, InGroup; +def warn_drv_deprecated_arg_ofast : Warning< + "argument '-Ofast'

[clang] [Bounds Safety][NFC] Add `SemaBoundsSafety` class and move existing Sema checks there (PR #98954)

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > Unfortunately, I think this should be held off until we have a bigger > > picture for the future of `Sema`. I'll elaborate below. > > If you take a close look at the existing set of `Sema` parts, it's almost > > entirely comprised of other languages or language extensions (fr

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

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @jyknight As the author of the RFC, are you happy with the current state of this PR? https://github.com/llvm/llvm-project/pull/98736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

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

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Could you add a flang driver test as well? I have troubles building Flang on my machine to test the change, so I'd prefer this be done in a separate PR by someone who knows how to do this. Is this fine by you? https://github.com/llvm/llvm-project/pull/98736 __

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

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/98736 >From 44b4a682f2b3d7e140f7b1bd124e7aabdbf439ad Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 13 Jul 2024 13:10:25 +0300 Subject: [PATCH 1/5] [clang] Add deprecation warning for `-Ofast` driver opt

[clang-tools-extra] two-or-so tiny documentation fixes/improvements in “main/clang-tools-extra/docs/modularize.rst” (PR #99256)

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

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

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

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I took the liberty to rename the PR to something more typical for our repository. I hope you don't mind. https://github.com/llvm/llvm-project/pull/99256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang-tools-extra] [clang-tools-extra] Fix typos in Modularize.rst (PR #99256)

2024-07-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: We don't have to wait for Linux CI to finish to merge this, but private e-mail is an issue. https://github.com/llvm/llvm-project/pull/99256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang][NFC] Move more functions from `Sema` to `SemaObjC` (PR #97172)

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

[clang] [Bounds Safety][NFC] Add `SemaBoundsSafety` class and move existing Sema checks there (PR #98954)

2024-07-17 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Out of curiosity, how does the current division of Sema fit into the "unique > language dialect" classification? I've noticed there are a bunch of > architecture specific Sema classes (e.g. SemaRISCV, SemaX86) and those don't > really fit the classification. They are a differ

[clang] [clang][NFC] Move Bounds Safety Sema code to `SemaBoundsSafety.cpp` (PR #99330)

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

[clang] [clang][NFC] Move Bounds Safety Sema code to `SemaBoundsSafety.cpp` (PR #99330)

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

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/98622 >From 5310764fb4044bcd4229434e80b64870c4b4ee8c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 12 Jul 2024 15:12:37 +0300 Subject: [PATCH 1/2] [clang] Fix crash in concept deprecation Apparently we

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-17 Thread Vlad Serebrennikov via cfe-commits
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator( tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(), /*DiagID=*/0); - if (const AutoType *AutoT = R->getAs()) -CheckConstrainedAuto( -AutoT, -

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-17 Thread Vlad Serebrennikov via cfe-commits
@@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator( tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(), /*DiagID=*/0); - if (const AutoType *AutoT = R->getAs()) -CheckConstrainedAuto( -AutoT, -

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/98622 >From 5310764fb4044bcd4229434e80b64870c4b4ee8c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 12 Jul 2024 15:12:37 +0300 Subject: [PATCH 1/3] [clang] Fix crash in concept deprecation Apparently we

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-17 Thread Vlad Serebrennikov via cfe-commits
@@ -6308,11 +6308,11 @@ TypeResult Sema::ActOnTypeName(Declarator &D) { CheckExtraCXXDefaultArguments(D); } - if (const AutoType *AutoT = T->getAs()) -CheckConstrainedAuto( -AutoT, -TInfo->getTypeLoc().getContainedAutoTypeLoc().getConceptNameLoc());

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

2024-07-18 Thread Vlad Serebrennikov via cfe-commits
@@ -931,7 +931,9 @@ def O : Joined<["-"], "O">, Group, def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>, Alias, AliasArgs<["1"]>; def Ofast : Joined<["-"], "Ofast">, Group, - Visibility<[ClangOption, CC1Option, FlangOption]>; + Visibility<[Clan

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

2024-07-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR has passed CI before latest wording suggestion by Shafik, so I'll go ahead and merge this. https://github.com/llvm/llvm-project/pull/98736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

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

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

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/98622 >From 5310764fb4044bcd4229434e80b64870c4b4ee8c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 12 Jul 2024 15:12:37 +0300 Subject: [PATCH 1/4] [clang] Fix crash in concept deprecation Apparently we

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-18 Thread Vlad Serebrennikov via cfe-commits
@@ -36,4 +36,11 @@ template // expected-warning@-1 {{'C' is deprecated}} // expected-note@#C {{'C' has been explicitly marked deprecated here}} void f(); + +template +auto b() = delete; // #b + +decltype(b<0>()) x; +// expected-error@-1 {{call to deleted function 'b'}} +//

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-07-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I was waiting for the CI, but it seems Linux CI would take hours. However > that shouldn't block the review I think, because Windows CI is green now. FWIW Linux CI is recovering as we speak. I expect full recovery over the weekend. https://github.com/llvm/llvm-project/pull/86

[clang] [clang] Fix crash in concept deprecation (PR #98622)

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

[clang] [clang] Fix crash in concept deprecation (PR #98622)

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

[clang] [clang] Fix crash in concept deprecation (PR #98622)

2024-07-18 Thread Vlad Serebrennikov via cfe-commits
@@ -6308,11 +6308,11 @@ TypeResult Sema::ActOnTypeName(Declarator &D) { CheckExtraCXXDefaultArguments(D); } - if (const AutoType *AutoT = T->getAs()) -CheckConstrainedAuto( -AutoT, -TInfo->getTypeLoc().getContainedAutoTypeLoc().getConceptNameLoc());

[clang] [clang] Fix crash in concept deprecation (PR #98622)

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

[clang] 5a45fed - [clang][NFC] Fix typo in `-Ofast` deprecation warning

2024-07-19 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-07-19T12:43:52+03:00 New Revision: 5a45fed188dce2ae6c4da23ba61c9b8df87f08f4 URL: https://github.com/llvm/llvm-project/commit/5a45fed188dce2ae6c4da23ba61c9b8df87f08f4 DIFF: https://github.com/llvm/llvm-project/commit/5a45fed188dce2ae6c4da23ba61c9b8df87f08f4.

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

2024-07-19 Thread Vlad Serebrennikov via cfe-commits
@@ -442,6 +442,10 @@ def warn_drv_deprecated_arg : Warning< def warn_drv_deprecated_arg_no_relaxed_template_template_args : Warning< "argument '-fno-relaxed-template-template-args' is deprecated">, InGroup; +def warn_drv_deprecated_arg_ofast : Warning< + "argument '-Ofast'

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

2024-07-19 Thread Vlad Serebrennikov via cfe-commits
@@ -153,6 +153,8 @@ void g() { namespace cwg2881 { // cwg2881: 19 ready 2024-06-26 #if __cplusplus >= 202302L +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winaccessible-base" Endilll wrote: Yes, we shouldn't be using `#pragma clang diagn

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

2024-07-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited 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] [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

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

[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 ___ cfe-comm

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

[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 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
@@ -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) - -callb

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

[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] [clang] Mark ill-formed partial specialization as invalid (PR #89536)

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

[clang] 662ef86 - [clang][NFC] Remove useless code in ASTWriter

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-24T11:09:06+03:00 New Revision: 662ef8604268b207910225ecca90daf30a46720b URL: https://github.com/llvm/llvm-project/commit/662ef8604268b207910225ecca90daf30a46720b DIFF: https://github.com/llvm/llvm-project/commit/662ef8604268b207910225ecca90daf30a46720b.

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
@@ -3597,8 +3597,13 @@ class ASTIdentifierTableTrait { /// doesn't check whether the name has macros defined; use PublicMacroIterator /// to check that. bool isInterestingIdentifier(const IdentifierInfo *II, uint64_t MacroOffset) { -if (MacroOffset || II->isPoisoned

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM @erichkeane mind giving CWG650 test a quick look? https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
@@ -4,7 +4,7 @@ // RUN: %clang_cc1 -std=c++17 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK // RUN: %clang_cc1 -std=c++20 %s -triple x86_64-linux-gnu -emit-llvm -o - -fexcepti

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

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

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

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

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @Sirraide See example of https://github.com/llvm/llvm-project/blob/662ef8604268b207910225ecca90daf30a46720b/clang/test/CXX/drs/dr25xx.cpp#L148 In this case, the date should be 2024-04-19. https://github.com/llvm/llvm-project/pull/89828

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/90079 This patch adds test for [CWG2149](https://cplusplus.github.io/CWG/issues/2149.html), following [P3106R1](https://wg21.link/p3106R1) "Clarifying rules for brace elision in aggregate initialization" and a clarif

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Status of 2149 changed just yesterday to say DR per 2024 Tokyo straw poll. That's where the discrepancy between official `cwg_index.html` and CWG GitHub repo comes (that I link in the description). https://github.com/llvm/llvm-project/pull/90079 _

[clang] [clang] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: >Can you add examples 14, 16, 17, 18 of the paper? I'll add them to conformance test suite in a subsequent PR. They don't belong here, as the issue is about deducing array length from brace initializer, but the examples you're listing are focusing on various aspects of how init

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-25 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @shafik I wonder how checking size of a vector is now considered an expensive check. (I stumbled upon it while reviewing) https://github.com/llvm/llvm-project/blob/47682e4b4a0c8e7637d65868a7208aa6806a50f4/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp#L99-L101 https://gith

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Thank you for spotting and fixing this! https://github.com/llvm/llvm-project/pull/90012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)

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

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

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

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -verify=expected,new +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -fno-relaxed-template-template-args -verify=expected,old Endilll wrote: We don't test non-

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

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

[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %clang_cc1 %s -fsyntax-only -std=c++23 -verify=expected,new Endilll wrote: Why only C++23 is tested? DR tests should test all language modes. https://github.com/llvm/llvm-project/pull/89807

<    9   10   11   12   13   14   15   16   17   18   >