[clang] [Clang][Sema] Reject invalid member using-declaration whose nested-name-specifier doesn't refer to a base class of the current class in C++98 mode (PR #143492)

2025-06-25 Thread Vlad Serebrennikov via cfe-commits
@@ -159,6 +159,11 @@ Resolutions to C++ Defect Reports - Implemented `CWG2496 ref-qualifiers and virtual overriding `_. +- Fully implemented `CWG400 Using-declarations and the "struct hack" ` + ``_. Correctly rejected inv

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Seems like we're missing a bunch of `TypeKind`s, currently missing 33 - 39 > and 179 - 181 enum variants. 180 and 181 were only added the other day, we > might want to look into some way to test these automatically to ensure that > any additions are also added on Python side i

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > Time to put libclang to use, and parse cindex.h? > > Probably, though I'll check if there are any more direct options first. I > don't quite like the idea of hardcoding source file paths in bindings tests. If that helps, it should be available using a relatively stable path,

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

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

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-06-04 Thread Vlad Serebrennikov via cfe-commits
@@ -3986,256 +3987,588 @@ def set_property(self, property, value): # Now comes the plumbing to hook up the C library. # Register callback types -translation_unit_includes_callback = CFUNCTYPE( +translation_unit_includes_callback: TypeAlias = CFUNCTYPE( # type: ignore [valid-

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-06-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Thank you for exploring this. I think there is a way forward. https://github.com/llvm/llvm-project/pull/142120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang][python][test] Check if libclang.so is loadable (PR #142353)

2025-06-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: We generally avoid XFAIL tests, instead we do normal tests where we expect the wrong behavior and leave a TODO. In this case UNSUPPORTED makes more sense. https://github.com/llvm/llvm-project/pull/142353 ___ cfe-commits mailing list cfe

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. I never meant to block this PR on the presence of an additional test infrastructure. https://github.com/llvm/llvm-project/pull/142634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > ⚠️ We detected that you are using a GitHub private e-mail address to > contribute to the repo. Please turn off [Keep my email addresses > private](https://github.com/settings/emails) setting in your account. See > [LLVM > Discourse](https://discourse.llvm.org/t/hidden-emails-

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-06-07 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > e.g. Python int maps to both c_int and c_uint Good example, thank you. So the crux of the issue is that we need to reconstruct one kind of function prototype from another. On the one hand, type annotations are consumed (mostly) statically, while ctypes prototype is consumed d

[clang] [Docs] Explicitly document libclang ABI and API stability (PR #141657)

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

[clang] [Clang] Added explanation why a is constructible evaluated to false. (PR #143309)

2025-06-12 Thread Vlad Serebrennikov via cfe-commits
@@ -564,11 +564,12 @@ struct A { namespace ex2 { #if __cplusplus >= 201103L struct Bar { - struct Baz { + struct Baz { // #Baz Endilll wrote: ```suggestion struct Baz { // #cwg1890-Baz ``` https://github.com/llvm/llvm-project/pull/143309 _

[clang] [Clang][Sema] Apply CWG400 'Using-declarations and the "struct hack"' to C++98 mode (PR #143492)

2025-06-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Tests in this PR needs to be evaluated against the existing wording, and not just against 20-years-old wording. I'm still not finished with that. https://github.com/llvm/llvm-project/pull/143492 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #146844)

2025-07-03 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: No idea why it blew up on that particular s390x buildbot. @AaronBallman Any ideas? https://github.com/llvm/llvm-project/pull/146844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [Clang][Sema] Reject invalid member using-declaration whose nested-name-specifier doesn't refer to a base class of the current class in C++98 mode (PR #143492)

2025-06-25 Thread Vlad Serebrennikov via cfe-commits
@@ -36,6 +36,13 @@ namespace cwg400 { // cwg400: 2.7 // expected-error@-1 {{member 'a' found in multiple base classes of different types}} // expected-note@#cwg400-A {{member type 'cwg400::A::a' found by ambiguous name lookup}} // expected-note@#cwg400-B {{member ty

[clang] [P3074] Partial implementation of support for trivial unions (PR #146815)

2025-07-03 Thread Vlad Serebrennikov via cfe-commits
@@ -922,7 +922,7 @@ namespace cwg667 { // cwg667: 8 struct B { ~B() = delete; }; union C { B b; }; - static_assert(!__is_trivially_destructible(C), ""); + static_assert(!__is_trivially_destructible(C), ""); // cxx26-error {{failed}} Endilll wrote: I thi

[clang] [P3074] Partial implementation of support for trivial unions (PR #146815)

2025-07-03 Thread Vlad Serebrennikov via cfe-commits
@@ -23,8 +24,8 @@ int n; // - X is a union-like class that has a variant member with a non-trivial // default constructor, -union Deleted1a { UserProvidedDefCtor u; }; // expected-note {{default constructor of 'Deleted1a' is implicitly deleted because variant field 'u' has a

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

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

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-02 Thread Vlad Serebrennikov via cfe-commits
@@ -107,6 +107,8 @@ void f() { constexpr int p = &*a; // since-cxx11-error@-1 {{cannot initialize a variable of type 'const int' with an rvalue of type 'A *'}} constexpr A *p2 = &*a; + // since-cxx11-error@-1 {{constexpr variable 'p2' must be initialized by a constant

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to CWG1458 test are fine, because it's still unspecified behavior, so we're conforming either way. Kudos for getting the expected directives (almost) right. https://github.com/llvm/llvm-project/pull/143667 ___

[clang] [Clang][Sema] Require `BaseClass::` (not other classes) in member using-declaration in C++98 mode (PR #143492)

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

[clang] [llvm] [Clang] Reintroduce obsolete libclang symbols to avoid an ABI break (PR #149079)

2025-07-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM This obviously has to be cherry-picked to the release branch. https://github.com/llvm/llvm-project/pull/149079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

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

<    19   20   21   22   23   24