[clang] [clang] Implement CWG2611 (PR #133747)

2025-03-31 Thread Vlad Serebrennikov via cfe-commits
@@ -35,6 +35,29 @@ namespace std { template T declval(); } // namespace std +namespace cwg2611 { // cwg2611: 21 +#if __cpp_fold_expressions >= 201603 Endilll wrote: ```suggestion #if __cplusplus >= 201703L ``` https://github.com/llvm/llvm-project/pull/1337

[clang] [clang][docs] Reflect the implementation status for P2280R4 (PR #127166)

2025-03-14 Thread Vlad Serebrennikov via cfe-commits
@@ -1,6 +1,8 @@ // RUN: %clang_cc1 -std=c++23 -verify=expected,nointerpreter %s // RUN: %clang_cc1 -std=c++23 -verify %s -fexperimental-new-constant-interpreter +// FIXME: P2280R4 should be backported. Run this in C++11 and later modes. Endilll wrote: On top

[clang] Warn about virtual methods in `final` classes (PR #131188)

2025-03-14 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wunnecessary-virtual-specifier %s + +struct Foo final { + Foo() = default; + virtual ~Foo() = default; // expected-warning {{virtual method}} + virtual Foo& operator=(Foo& other) = default; // ex

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

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

[clang] [libclang/C++] Fix clang_File_isEqual for in-memory files (PR #135773)

2025-04-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM, but how this fares against our stability guarantees for libclang APIs? Do we need `clang_File_isEqual2`? https://github.com/llvm/llvm-project/pull/135773 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] 41112db - [clang][NFC] Remove old commented out code

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T08:50:14+03:00 New Revision: 41112db5a5a7806b27de9b6a460894b82036b41a URL: https://github.com/llvm/llvm-project/commit/41112db5a5a7806b27de9b6a460894b82036b41a DIFF: https://github.com/llvm/llvm-project/commit/41112db5a5a7806b27de9b6a460894b82036b41a.

[clang] b10296e - [clang][NFC] Convert `Sema::PragmaClangSectionKind` to scoped enum

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T08:57:10+03:00 New Revision: b10296eff0c26497aac01b96d57a5dffacebec67 URL: https://github.com/llvm/llvm-project/commit/b10296eff0c26497aac01b96d57a5dffacebec67 DIFF: https://github.com/llvm/llvm-project/commit/b10296eff0c26497aac01b96d57a5dffacebec67.

[clang] 4f96ce4 - [clang][NFC] Convert `Sema::PragmaClangSectionAction` to scoped enum

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T09:06:32+03:00 New Revision: 4f96ce414bcc35ec7e3d8bec18f6a4d7a4c4632a URL: https://github.com/llvm/llvm-project/commit/4f96ce414bcc35ec7e3d8bec18f6a4d7a4c4632a DIFF: https://github.com/llvm/llvm-project/commit/4f96ce414bcc35ec7e3d8bec18f6a4d7a4c4632a.

[clang] ed95624 - [clang][NFC] Convert `StmtDiscardKind` to a scoped enum

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T06:54:00+03:00 New Revision: ed95624e208e5bf7c3eeadfccee0fb6060a4ca98 URL: https://github.com/llvm/llvm-project/commit/ed95624e208e5bf7c3eeadfccee0fb6060a4ca98 DIFF: https://github.com/llvm/llvm-project/commit/ed95624e208e5bf7c3eeadfccee0fb6060a4ca98.

[clang] 096c20c - [clang][NFC] Convert enums in TypeLocBuilder into constants

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T06:57:16+03:00 New Revision: 096c20c0b1284ccf3d3af106a026450403bc288f URL: https://github.com/llvm/llvm-project/commit/096c20c0b1284ccf3d3af106a026450403bc288f DIFF: https://github.com/llvm/llvm-project/commit/096c20c0b1284ccf3d3af106a026450403bc288f.

[clang] f3a61f6 - [clang][NFC] Convert `LookupResult::AmbiguityKind` to scoped enum

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T08:22:57+03:00 New Revision: f3a61f61eef53ecc0b59d14c52396df4f47ee5e8 URL: https://github.com/llvm/llvm-project/commit/f3a61f61eef53ecc0b59d14c52396df4f47ee5e8 DIFF: https://github.com/llvm/llvm-project/commit/f3a61f61eef53ecc0b59d14c52396df4f47ee5e8.

[clang] a764358 - [clang][NFC] Convert DeclUpdateKind to scoped enum

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T08:05:46+03:00 New Revision: a764358a9d86e9169bea895c8efbb61cc37ec788 URL: https://github.com/llvm/llvm-project/commit/a764358a9d86e9169bea895c8efbb61cc37ec788 DIFF: https://github.com/llvm/llvm-project/commit/a764358a9d86e9169bea895c8efbb61cc37ec788.

[clang] 98eeedd - [clang][NFC] Convert `NumLVComputationKindBits` to a constant

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T08:09:41+03:00 New Revision: 98eeedd4a100600dd91cda14e0096483403c408b URL: https://github.com/llvm/llvm-project/commit/98eeedd4a100600dd91cda14e0096483403c408b DIFF: https://github.com/llvm/llvm-project/commit/98eeedd4a100600dd91cda14e0096483403c408b.

[clang] 0b6d71f - [clang][NFC] Convert `Sema::TUFragmentKind` to scoped enum

2025-04-28 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T12:50:26+03:00 New Revision: 0b6d71fe10d46741a6f50c17b3fc795fd82e27b7 URL: https://github.com/llvm/llvm-project/commit/0b6d71fe10d46741a6f50c17b3fc795fd82e27b7 DIFF: https://github.com/llvm/llvm-project/commit/0b6d71fe10d46741a6f50c17b3fc795fd82e27b7.

[clang] 44d8aa8 - [clang][NFC] Convert `Parser::CachedInitKind` to scoped enum

2025-04-29 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-30T05:49:29+03:00 New Revision: 44d8aa8139e02e7b1642f284b32757ee446a88e6 URL: https://github.com/llvm/llvm-project/commit/44d8aa8139e02e7b1642f284b32757ee446a88e6 DIFF: https://github.com/llvm/llvm-project/commit/44d8aa8139e02e7b1642f284b32757ee446a88e6.

[clang] e8c684a - [clang][NFC] Convert `Parser::ParenParseOption` to scoped enum

2025-04-29 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-30T07:01:01+03:00 New Revision: e8c684a0e4299077904892d11b1906f8e660eb01 URL: https://github.com/llvm/llvm-project/commit/e8c684a0e4299077904892d11b1906f8e660eb01 DIFF: https://github.com/llvm/llvm-project/commit/e8c684a0e4299077904892d11b1906f8e660eb01.

[clang] 4075a36 - [clang][NFC] Convert `Parser::CastParseKind` to scoped enum

2025-04-29 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-30T06:48:37+03:00 New Revision: 4075a3698a3fdda3a77ce2456e3bfefbc0f0c56e URL: https://github.com/llvm/llvm-project/commit/4075a3698a3fdda3a77ce2456e3bfefbc0f0c56e DIFF: https://github.com/llvm/llvm-project/commit/4075a3698a3fdda3a77ce2456e3bfefbc0f0c56e.

[clang] 5f22b84 - [clang][NFC] Convert `Parser::IfExistsBehavior` to scoped enum

2025-04-29 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-30T07:08:47+03:00 New Revision: 5f22b84b653e9b76a21ea4ea2ae864173242f237 URL: https://github.com/llvm/llvm-project/commit/5f22b84b653e9b76a21ea4ea2ae864173242f237 DIFF: https://github.com/llvm/llvm-project/commit/5f22b84b653e9b76a21ea4ea2ae864173242f237.

[clang] 78a1d92 - [clang][NFC] Convert `Parser::TentativeCXXTypeIdContext` to scoped enum

2025-04-29 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-30T07:14:31+03:00 New Revision: 78a1d92870b596c67ee301b96d3a7864bafaab92 URL: https://github.com/llvm/llvm-project/commit/78a1d92870b596c67ee301b96d3a7864bafaab92 DIFF: https://github.com/llvm/llvm-project/commit/78a1d92870b596c67ee301b96d3a7864bafaab92.

[clang] 4595e80 - [clang][NFC] Convert `Parser::AnnotatedNameKind` to scoped enum

2025-04-29 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-30T02:23:39+03:00 New Revision: 4595e8092ed5ce69b3ce33e989d7bea3a25fc289 URL: https://github.com/llvm/llvm-project/commit/4595e8092ed5ce69b3ce33e989d7bea3a25fc289 DIFF: https://github.com/llvm/llvm-project/commit/4595e8092ed5ce69b3ce33e989d7bea3a25fc289.

[clang] 7ecd81e - [clang][NFC] Convert `Parser::ExtraSemiKind` to scoped enum

2025-04-29 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-30T02:31:31+03:00 New Revision: 7ecd81e266174253786e084c100c22c65a214b5d URL: https://github.com/llvm/llvm-project/commit/7ecd81e266174253786e084c100c22c65a214b5d DIFF: https://github.com/llvm/llvm-project/commit/7ecd81e266174253786e084c100c22c65a214b5d.

[clang] a7402b0 - [clang][NFC] Convert `Parser::ScopeCacheSize` to a constant

2025-04-29 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-30T02:17:17+03:00 New Revision: a7402b0c4ac1cc255354904ef1f46aa7b714c44f URL: https://github.com/llvm/llvm-project/commit/a7402b0c4ac1cc255354904ef1f46aa7b714c44f DIFF: https://github.com/llvm/llvm-project/commit/a7402b0c4ac1cc255354904ef1f46aa7b714c44f.

[clang] c2c0ef5 - [clang][NFC] Convert `Sema::VariadicCallType` to scoped enum

2025-04-30 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-01T07:01:06+03:00 New Revision: c2c0ef50a1a679058fffe445a6e78b6d232dc231 URL: https://github.com/llvm/llvm-project/commit/c2c0ef50a1a679058fffe445a6e78b6d232dc231 DIFF: https://github.com/llvm/llvm-project/commit/c2c0ef50a1a679058fffe445a6e78b6d232dc231.

[clang] 5f3e5df - [clang][NFC] Convert `Sema::BuiltinCountedByRefKind` to scoped enum

2025-04-30 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-01T08:01:03+03:00 New Revision: 5f3e5df48186a7e409d548deec13a68486e3b944 URL: https://github.com/llvm/llvm-project/commit/5f3e5df48186a7e409d548deec13a68486e3b944 DIFF: https://github.com/llvm/llvm-project/commit/5f3e5df48186a7e409d548deec13a68486e3b944.

[clang] e70a8a6 - [clang][NFC] Convert `Sema::NameClassificationKind` to scoped enum

2025-04-30 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-01T08:13:30+03:00 New Revision: e70a8a6e0e9c3700bcfe7e9cce3c5edee6a51022 URL: https://github.com/llvm/llvm-project/commit/e70a8a6e0e9c3700bcfe7e9cce3c5edee6a51022 DIFF: https://github.com/llvm/llvm-project/commit/e70a8a6e0e9c3700bcfe7e9cce3c5edee6a51022.

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

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

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-04-30 Thread Vlad Serebrennikov via cfe-commits
@@ -2888,8 +2896,7 @@ def string(self): if res: return CompletionString(res) -else: -None +return None Endilll wrote: Can you invert this if statement, so that we do early exit on unhappy code paths? https://g

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-04-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for working on this! Looks good overall. I left some comments https://github.com/llvm/llvm-project/pull/138074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-04-30 Thread Vlad Serebrennikov via cfe-commits
@@ -2955,6 +2962,10 @@ def __getitem__(self, key): raise IndexError return CompletionChunk(self.obj, key) +def __iter__(self): +for i in range(len(self)): +yield self[i] + Endilll wrote: Can we put this under `if TY

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-04-30 Thread Vlad Serebrennikov via cfe-commits
@@ -3466,6 +3479,8 @@ def get_tokens(self, locations=None, extent=None): """ if locations is not None: extent = SourceRange(start=locations[0], end=locations[1]) +if extent is None: +raise TypeError("get_tokens() requires at least

[clang] [clang] Fix elaborated keyword canonicalization (PR #135916)

2025-04-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: C++ DR test changes LGTM https://github.com/llvm/llvm-project/pull/135916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add scoped enum support to `StreamingDiagnostic` (PR #138089)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
@@ -1429,6 +1429,22 @@ operator<<(const StreamingDiagnostic &DB, T *DC) { return DB; } +// Convert scope enums to their underlying type, so that we don't have +// clutter the emitting code with `llvm::to_underlying()`. +// We also need to disable implicit conversion for the

[clang] Remove duplicate API (PR #132776)

2025-05-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I've seen this failure before, I don't think it's related to this PR. https://github.com/llvm/llvm-project/pull/132776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Regroup declarations in `Parser` (PR #138511)

2025-05-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > 3. File has been formatted with clang-format, except for the grammar, > > because clang-format butchers it. > > Yeah, this problem comes up rather frequently, I wonder if clang-format can > get some additional smarts to make that less of a challenge? CC > @mydeveloperday @o

[clang] [clang][NFC] Regroup declarations in `Parser` (PR #138511)

2025-05-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I think downstreams need some kind of notification that this large of a > change is coming; can you post something to Discourse to alert them and > encourage them to mention any major hardships on this PR? https://discourse.llvm.org/t/parser-h-reorganization-pr/86178 https://

[clang] [llvm] [clang] Add scoped enum support to `StreamingDiagnostic` (PR #138089)

2025-04-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/138089 This patch adds templated `operator<<` for diagnostics that pass scoped enums, saving people from `llvm::to_underlying()` clutter on the side of emitting the diagnostic. This eliminates 80 out of 220 usages of

[clang] [llvm] Revert "[clang] Add scoped enum support to `StreamingDiagnostic`" (PR #138139)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: #138134 seems to stick. I'll close this PR later if everything goes well https://github.com/llvm/llvm-project/pull/138139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add scoped enum support to `StreamingDiagnostic` (PR #138089)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
@@ -1429,6 +1429,22 @@ operator<<(const StreamingDiagnostic &DB, T *DC) { return DB; } +// Convert scope enums to their underlying type, so that we don't have +// clutter the emitting code with `llvm::to_underlying()`. +// We also need to disable implicit conversion for the

[clang] [llvm] [clang] Add scoped enum support to `StreamingDiagnostic` (PR #138089)

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

[clang] [llvm] [ADT] Remove `is_scoped_enum_v` (PR #138134)

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

[clang] [libclang/python] Add tests for equality operators. (PR #138132)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
@@ -16,6 +16,8 @@ from .util import get_cursor, get_tu +INPUTS_DIR = os.path.join(os.path.dirname(__file__), "INPUTS") Endilll wrote: I think our minimal requirements for Python version allow us to take advantage of `pathlib`. https://github.com/llvm/llvm-

[clang] [llvm] [ADT] Remove `is_scoped_enum_v` (PR #138134)

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

[clang] [llvm] [clang] Add scoped enum support to `StreamingDiagnostic` (PR #138089)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Ideally we would use constraints for that, when we switch to c++20. I'd love to, yeah https://github.com/llvm/llvm-project/pull/138089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I totally forgot about release notes and tests. While release notes may not be necessary, I think we should test those new checks that you added. https://github.com/llvm/llvm-project/pull/138074 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] [clang] Add scoped enum support to `StreamingDiagnostic` (PR #138089)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Apparently, my implementation of `is_scoped_enum_v` is not SFINAE-able enough. I'm working on a fix. https://github.com/llvm/llvm-project/pull/138089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

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

[clang] [llvm] [clang] Add scoped enum support to `StreamingDiagnostic` (PR #138089)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
@@ -1429,6 +1429,22 @@ operator<<(const StreamingDiagnostic &DB, T *DC) { return DB; } +// Convert scope enums to their underlying type, so that we don't have +// clutter the emitting code with `llvm::to_underlying()`. +// We also need to disable implicit conversion for the

[clang] [libclang/python] Add tests for equality operators. (PR #138132)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll I added the tests as discussed on #138074 . Thank you! > I'm just not sure how/if we can reasonably test the `else` path for > `briefComment`: this requires a `libclang.so` built before LLVM 3.2 (the > check was added 13 years ago in > [b947e82](https://github.com/l

[clang] [libclang/python] Add some logical typing changes. (PR #138074)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Which parts do you mean? The `__eq__` operators for other objects? Yes, and `briefComment` function, too. https://github.com/llvm/llvm-project/pull/138074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [llvm] Revert "[clang] Add scoped enum support to `StreamingDiagnostic`" (PR #138139)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/138139 Reverts llvm/llvm-project#138089 due to `std::underlying_type` being SFINAE-unfriendly in Clang and GCC before 9. Buildbot failure https://lab.llvm.org/buildbot/#/builders/134/builds/17904 >From 08f8efd49c7043

[clang] [libclang/python] Remove compatibility workaround for briefComment (PR #138135)

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

[clang] [libclang/python] Remove compatibility workaround for briefComment (PR #138135)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: For the record, this was discussed in https://github.com/llvm/llvm-project/pull/138132#issuecomment-2844879381 https://github.com/llvm/llvm-project/pull/138135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [llvm] [ADT] Make `is_scoped_enum_v` SFINAE-able (PR #138134)

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/138134 >From 31a9c444b5ef6155ec1cdb35d9e659dd60b21dcc Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 1 May 2025 16:51:38 +0300 Subject: [PATCH 1/2] [ADT] Make `is_scoped_enum_v` SFINAE-able ...in old com

[clang] [llvm] [ADT] Make `is_scoped_enum_v` SFINAE-able (PR #138134)

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

[clang] [llvm] [ADT] Remove `is_scoped_enum_v` (PR #138134)

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

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/130383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-24 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1 @@ +1, 2, 3 Endilll wrote: Lack of newline at the end of the file doesn't seem to be an important part of the test. You should add it to both `a.inc` and `b.inc` https://github.com/llvm/llvm-project/pull/130383 ___

[clang] Remove duplicate API (PR #132776)

2025-04-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. I talked to Aaron offline whether there's a better way to mark duplicates as deprecated, but given the variety of C compilers that can consume this header, we don't think there's a better way than a doxygen comment https://github.com/llvm/

[clang] Remove duplicate API (PR #132776)

2025-04-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @Jugst3r Let us know if this is ready to be merged. https://github.com/llvm/llvm-project/pull/132776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 21444e3 - [clang][NFC] Convert `Sema::PragmaMsStackAction` to scoped enum

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T09:21:17+03:00 New Revision: 21444e37ab3fa1a62e6113c85954e3f98ee48698 URL: https://github.com/llvm/llvm-project/commit/21444e37ab3fa1a62e6113c85954e3f98ee48698 DIFF: https://github.com/llvm/llvm-project/commit/21444e37ab3fa1a62e6113c85954e3f98ee48698.

[clang] ab680c5 - Revert "[clang][NFC] Convert `Sema::PragmaMsStackAction` to scoped enum"

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T09:24:25+03:00 New Revision: ab680c55c724ba894269fb687464961a2066c17f URL: https://github.com/llvm/llvm-project/commit/ab680c55c724ba894269fb687464961a2066c17f DIFF: https://github.com/llvm/llvm-project/commit/ab680c55c724ba894269fb687464961a2066c17f.

[clang] c2d47a9 - [clang][NFC] Convert `Sema::PragmaOptionsAlignKind` to scoped enum

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T09:30:19+03:00 New Revision: c2d47a912f9bef427ff249f6e6ebfab89ac37902 URL: https://github.com/llvm/llvm-project/commit/c2d47a912f9bef427ff249f6e6ebfab89ac37902 DIFF: https://github.com/llvm/llvm-project/commit/c2d47a912f9bef427ff249f6e6ebfab89ac37902.

[clang] ee29afe - [clang][NFC] Convert LookupResultKind to scoped enum

2025-04-27 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T08:42:02+03:00 New Revision: ee29afe1e56d911f2fde54f5de141f4c4a0a1feb URL: https://github.com/llvm/llvm-project/commit/ee29afe1e56d911f2fde54f5de141f4c4a0a1feb DIFF: https://github.com/llvm/llvm-project/commit/ee29afe1e56d911f2fde54f5de141f4c4a0a1feb.

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-04-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'm using nightly builds of Clang to work on Clang, and I ended up passing `-Wno-preferred-type-bitfield-enum-conversion`, otherwise my terminal is drowned in the aforementioned warning about `FPEvalMethod` https://github.com/llvm/llvm-project/pull/116785 ___

[clang] 12a4ec6 - [clang][NFC] Convert `Sema::FormatStringType` to scoped enum

2025-04-28 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-28T13:54:26+03:00 New Revision: 12a4ec6b1af8a50d31ee91093666e0fa455a4c35 URL: https://github.com/llvm/llvm-project/commit/12a4ec6b1af8a50d31ee91093666e0fa455a4c35 DIFF: https://github.com/llvm/llvm-project/commit/12a4ec6b1af8a50d31ee91093666e0fa455a4c35.

[clang] ff8060a - [clang][NFC] Convert `Sema::AssignConvertType` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T12:30:08+03:00 New Revision: ff8060a642377a17a1dfadb865634583cde4e097 URL: https://github.com/llvm/llvm-project/commit/ff8060a642377a17a1dfadb865634583cde4e097 DIFF: https://github.com/llvm/llvm-project/commit/ff8060a642377a17a1dfadb865634583cde4e097.

[clang] 461255e - [clang][NFC] Convert `Sema::AllocationFunctionScope` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T12:38:52+03:00 New Revision: 461255e0c17265141009437ba3887f49f9838a40 URL: https://github.com/llvm/llvm-project/commit/461255e0c17265141009437ba3887f49f9838a40 DIFF: https://github.com/llvm/llvm-project/commit/461255e0c17265141009437ba3887f49f9838a40.

[clang] c0917ab - [clang][NFC] Convert `Sema::IfExistsResult` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T13:05:37+03:00 New Revision: c0917ab2e1cf603c3746f519fe1826869767bd8b URL: https://github.com/llvm/llvm-project/commit/c0917ab2e1cf603c3746f519fe1826869767bd8b DIFF: https://github.com/llvm/llvm-project/commit/c0917ab2e1cf603c3746f519fe1826869767bd8b.

[clang] 4ba2778 - [clang][NFC] Convert `Sema::CorrectTypoKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T13:20:41+03:00 New Revision: 4ba27780d34916d4a856e6593035b15a5cace56e URL: https://github.com/llvm/llvm-project/commit/4ba27780d34916d4a856e6593035b15a5cace56e DIFF: https://github.com/llvm/llvm-project/commit/4ba27780d34916d4a856e6593035b15a5cace56e.

[clang] [Clang] Implement CWG3005 Function parameters should never be name-independent (PR #138245)

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'm not going to bother you with the description of what I want to see in this file. Here you go: ```cpp // RUN: %clang_cc1 -std=c++98 -pedantic-errors -verify=expected %s // RUN: %clang_cc1 -std=c++11 -pedantic-errors -verify=expected %s // RUN:

[clang] cf2f13a - [clang][NFC] Convert `Sema::CCEKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T14:01:40+03:00 New Revision: cf2f13a867fb86b5c7ce33df8a569477dce71f4f URL: https://github.com/llvm/llvm-project/commit/cf2f13a867fb86b5c7ce33df8a569477dce71f4f DIFF: https://github.com/llvm/llvm-project/commit/cf2f13a867fb86b5c7ce33df8a569477dce71f4f.

[clang] [libclang/python] Add tests for equality operators. (PR #138132)

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

[clang] 68fd69a - [clang][NFC] Convert `Sema::PointerAuthDiscArgKind` to scoped enum

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T07:33:52+03:00 New Revision: 68fd69aca6c9d8129cd5dc27829a8abebea4cefc URL: https://github.com/llvm/llvm-project/commit/68fd69aca6c9d8129cd5dc27829a8abebea4cefc DIFF: https://github.com/llvm/llvm-project/commit/68fd69aca6c9d8129cd5dc27829a8abebea4cefc.

[clang] 09fb9ad - [clang][NFC] Convert `Sema::NonTrivialCUnionContext` to scoped enum

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T07:39:54+03:00 New Revision: 09fb9adbd2a432a83e451ee9156faceb9d76e9aa URL: https://github.com/llvm/llvm-project/commit/09fb9adbd2a432a83e451ee9156faceb9d76e9aa DIFF: https://github.com/llvm/llvm-project/commit/09fb9adbd2a432a83e451ee9156faceb9d76e9aa.

[clang] 8089c3d - [clang][NFC] Convert `Sema::NonTagKind` to scoped enum

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T07:45:22+03:00 New Revision: 8089c3d1edf0f880415bfbc155571f4a43fcdf17 URL: https://github.com/llvm/llvm-project/commit/8089c3d1edf0f880415bfbc155571f4a43fcdf17 DIFF: https://github.com/llvm/llvm-project/commit/8089c3d1edf0f880415bfbc155571f4a43fcdf17.

[clang] ed673aa - [clang][NFC] Convert `Sema::OffsetOfKind` to scoped enum

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T07:49:47+03:00 New Revision: ed673aac7aa78896ec55aa615e37432006c2830a URL: https://github.com/llvm/llvm-project/commit/ed673aac7aa78896ec55aa615e37432006c2830a DIFF: https://github.com/llvm/llvm-project/commit/ed673aac7aa78896ec55aa615e37432006c2830a.

[clang] 6e63b68 - [clang][NFC] Convert `Sema::OverloadKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T13:44:32+03:00 New Revision: 6e63b68389983194b5007d8d489e74d1ffcea500 URL: https://github.com/llvm/llvm-project/commit/6e63b68389983194b5007d8d489e74d1ffcea500 DIFF: https://github.com/llvm/llvm-project/commit/6e63b68389983194b5007d8d489e74d1ffcea500.

[clang] 630a0ff - [clang][NFC] Convert `Sema::TrivialABIHandling` to scoped enum

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T09:12:52+03:00 New Revision: 630a0ff2c25c4ced739b1c07633097ccbf182cd6 URL: https://github.com/llvm/llvm-project/commit/630a0ff2c25c4ced739b1c07633097ccbf182cd6 DIFF: https://github.com/llvm/llvm-project/commit/630a0ff2c25c4ced739b1c07633097ccbf182cd6.

[clang] be6497f - [clang][NFC] Convert `Sema::TryCaptureKind` to scoped enum

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T09:25:58+03:00 New Revision: be6497ff7583248d76a6710dd48cfeb63dd68f27 URL: https://github.com/llvm/llvm-project/commit/be6497ff7583248d76a6710dd48cfeb63dd68f27 DIFF: https://github.com/llvm/llvm-project/commit/be6497ff7583248d76a6710dd48cfeb63dd68f27.

[clang] 048befe - Revert "[clang][NFC] Convert `Sema::TryCaptureKind` to scoped enum"

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T09:29:35+03:00 New Revision: 048befe9ef7edab3580a922d69664b21e2a532fa URL: https://github.com/llvm/llvm-project/commit/048befe9ef7edab3580a922d69664b21e2a532fa DIFF: https://github.com/llvm/llvm-project/commit/048befe9ef7edab3580a922d69664b21e2a532fa.

[clang] 140c2b6 - [clang][NFC] Convert `Sema::AllowFoldKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T10:48:08+03:00 New Revision: 140c2b6d081b781b19f50bf1c4fbf4b17bfacdc1 URL: https://github.com/llvm/llvm-project/commit/140c2b6d081b781b19f50bf1c4fbf4b17bfacdc1 DIFF: https://github.com/llvm/llvm-project/commit/140c2b6d081b781b19f50bf1c4fbf4b17bfacdc1.

[clang] db247dd - [clang][NFC] Convert `Sema::ArithConvKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T11:02:01+03:00 New Revision: db247ddc9d5411ace70b478f7119eb44a43a8e5c URL: https://github.com/llvm/llvm-project/commit/db247ddc9d5411ace70b478f7119eb44a43a8e5c DIFF: https://github.com/llvm/llvm-project/commit/db247ddc9d5411ace70b478f7119eb44a43a8e5c.

[clang] d0dcfd4 - [clang][NFC] Convert `Sema::VarArgKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T11:24:08+03:00 New Revision: d0dcfd4c68171c3b9b863626c08efa7f38cd0c54 URL: https://github.com/llvm/llvm-project/commit/d0dcfd4c68171c3b9b863626c08efa7f38cd0c54 DIFF: https://github.com/llvm/llvm-project/commit/d0dcfd4c68171c3b9b863626c08efa7f38cd0c54.

[clang] 7e71db8 - [clang][NFC] Convert `Sema::AvailabilityMergeKind` to scoped enum

2025-05-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T07:56:57+03:00 New Revision: 7e71db8463adfbaadbd28a6c0e8b807ff7075c3c URL: https://github.com/llvm/llvm-project/commit/7e71db8463adfbaadbd28a6c0e8b807ff7075c3c DIFF: https://github.com/llvm/llvm-project/commit/7e71db8463adfbaadbd28a6c0e8b807ff7075c3c.

[clang] [Clang] Fix the warning group of several compatibilty diagnostics (PR #138872)

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

[clang] [clang][NFC] Regroup declarations in `Parser` (PR #138511)

2025-05-07 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > > > 3. File has been formatted with clang-format, except for the grammar, > > > > because clang-format butchers it. > > > > > > > > > Yeah, this problem comes up rather frequently, I wonder if clang-format > > > can get some additional smarts to make that less of a challeng

[clang] [TBAA] Refine pointer-tbaa for void pointers by pointer depth (PR #126047)

2025-02-17 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @brunodf-snps A reminder at the moment when you think this should be merged would be appreciated. https://github.com/llvm/llvm-project/pull/126047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [Clang] Implement CWG2918 'Consideration of constraints for address of overloaded function' (PR #127773)

2025-02-19 Thread Vlad Serebrennikov via cfe-commits
@@ -60,6 +60,90 @@ struct S { #endif } // namespace cwg2917 +namespace cwg2918 { // cwg2918: 21 + +#if __cplusplus >= 202002L Endilll wrote: It seems that only example 2 needs C++20. Have you considered testing examples 1 and 3 in C++11 through C++17 modes?

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I think the failure in question is ``` == FAIL: test_file_eq (tests.cindex.test_file.TestFile.test_file_eq) -- Traceback (most recent call last):

[clang] Change `ASTUnit::getASTContext() const` to return a non-const `ASTContext` (PR #130096)

2025-03-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. I agree with Aaron that this patch doesn't move us towards the direction we generally want. I'd like to see more justification than 2 lines in the description. https://github.com/llvm/llvm-project/pull/130096 __

[clang] [clang] NNS: don't print trailing scope resolution operator in diagnostics (PR #130529)

2025-03-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to C++ DR tests look good to me https://github.com/llvm/llvm-project/pull/130529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-03-01 Thread Vlad Serebrennikov via cfe-commits
@@ -2022,6 +2025,14 @@ def lexical_parent(self): return self._lexical_parent +@property +def specialized_template(self): +"""Return the base template that this cursor is a specialization of, if any.""" Endilll wrote: I wonder if "bas

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-03-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Even though this PR is rather small, it is still a bunch of changes here and there. I'd prefer it to be split up into multiple focused PRs. https://github.com/llvm/llvm-project/pull/120590 ___ cfe-commits mailing

[clang] [libclang/python] Add a few things to the python api (PR #120590)

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

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-03-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll since there hasn't been a reply in months, do you think it's > appropriate to close this? Our existing practice is that PRs remain to linger like this until someone picks them up. Closing it would be "we don't want this" answer, and it wouldn't be correct. That's ho

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-03-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll @LecrisUT what else do you think needs to be done here to get this > approved? I still would like to hear from @sighingnow. One of the reasons is that I think I've seen them attending one of the open meetings we have, so they might be around somewhere. Also I barely

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

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

[clang] [clang] C++20 Modules: document how to perform automated reductions (PR #124997)

2025-03-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @cor3ntin do you sustain an objection due to the lack of a full > beginner-friendly test case reduction tutorial? I think this PR is improvement over status quo, but I see where Corentin is coming from with his objection. Maybe the middle ground would be to explicitly acknowl

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-03-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @nightlark Thank you for the write-up about things that can go wrong. > open question: what email to list as the author? This is a good question I don't know answer to. Debian packages from our APT repository seems to specify `LLVM Packaging Team ` as the maintainer and their em

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-03-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/124844 >From da30f708caee020677675277673e0b7c6f9c644f Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 Jan 2025 15:15:17 +0400 Subject: [PATCH 01/15] [clang] Diagnose default arguments defined in differe

<    17   18   19   20   21   22   23   24   >