[clang] [llvm] Expose format (attribute) info for function declarations in Clang Index API (PR #113754)

2024-12-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I'm sorry it took us a while to notice this PR. I think that documentation of new functions should describe what happens on unhappy code paths, too. I also would like to see unit tests and a release note. Even more, I'd like @AaronBallman to sign this off

[clang] [llvm] Expose format (attribute) info for function declarations in Clang Index API (PR #113754)

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

[clang] [llvm] Expose format (attribute) info for function declarations in Clang Index API (PR #113754)

2024-12-18 Thread Vlad Serebrennikov via cfe-commits
@@ -71,3 +71,5 @@ pythonenv* /clang/utils/analyzer/projects/*/RefScanBuildResults # automodapi puts generated documentation files here. /lldb/docs/python_api/ +silver-debug +silver-build Endilll wrote: Those are unrelated changes that should remain local to yo

[clang] [libclang/python] Add python binding for clang_Cursor_isAnonymousRecordDecl (PR #120483)

2024-12-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. You should add a release note and a PR description. LGTM otherwise. https://github.com/llvm/llvm-project/pull/120483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2025-01-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The failure reminds me of #122063, which was merged just 2 hours ago. Do you mind merging the `main` into your PR and try again? https://github.com/llvm/llvm-project/pull/120494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] 33fc477 - [clang][NFC] Update `cxx_dr_status.html`

2025-01-24 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-24T15:01:09+04:00 New Revision: 33fc477e6e2614f71541f4287c1d68757b9203b0 URL: https://github.com/llvm/llvm-project/commit/33fc477e6e2614f71541f4287c1d68757b9203b0 DIFF: https://github.com/llvm/llvm-project/commit/33fc477e6e2614f71541f4287c1d68757b9203b0.

[clang] 5a7a324 - [clang][NFC] Migrate bit-fields of OverloadCandidate to LLVM_PREFERRED_TYPE

2025-01-20 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-20T14:19:32+04:00 New Revision: 5a7a3242639a17b049d70ee00798957ea21eb182 URL: https://github.com/llvm/llvm-project/commit/5a7a3242639a17b049d70ee00798957ea21eb182 DIFF: https://github.com/llvm/llvm-project/commit/5a7a3242639a17b049d70ee00798957ea21eb182.

[clang] [clang][bytecode] Don't memcpy() FixedPoint values (PR #123599)

2025-01-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Maybe worth adding a release note, especially if you can write a test that would fail without this patch? https://github.com/llvm/llvm-project/pull/123599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang][bytecode] Don't memcpy() FixedPoint values (PR #123599)

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

[clang] [clang][bytecode] Don't memcpy() FixedPoint values (PR #123599)

2025-01-20 Thread Vlad Serebrennikov via cfe-commits
@@ -91,6 +91,31 @@ class FixedPoint final { return ComparisonCategoryResult::Greater; } + size_t bytesToSerialize() const { +return sizeof(uint32_t) + (V.getValue().getBitWidth() / CHAR_BIT); + } + + void serialize(std::byte *Buff) const { +// Semantics follow

[clang] [clang][bytecode] Don't memcpy() FixedPoint values (PR #123599)

2025-01-20 Thread Vlad Serebrennikov via cfe-commits
@@ -91,6 +91,31 @@ class FixedPoint final { return ComparisonCategoryResult::Greater; } + size_t bytesToSerialize() const { +return sizeof(uint32_t) + (V.getValue().getBitWidth() / CHAR_BIT); Endilll wrote: I wonder how much do we care about `CHAR_

[clang] [clang] Added warn-assignment-bool-context (PR #115234)

2025-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > No problem, I know everybody is busy. > > > The first step is to get the PR out of draft state. > > Do you just mean to mark it "read for review" or to apply changes so that it > can be merged? Because the current implementation is not ready as I still > have some questions a

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

2025-01-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Python part of this looks fine to me. We need to rename `fields_visit_callback` to something else, but that's not in the scope of this PR. https://github.com/llvm/llvm-project/pull/123539 ___ cfe-commits mailing l

[clang] [clang] Fix heap-use-after-free in TryAnnotateTypeOrScopeTokenAfterScopeSpec (PR #124521)

2025-01-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: You need to add a test. We have ASan buildbots, but they only run post-merge. You can use `LLVM_USE_SANITIZER` [CMake option](https://llvm.org/docs/CMake.html#:~:text=llvm_use_sanitizer%3Astring) to check locally that Clang crashes on your test without the fix. https://github.c

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-26 Thread Vlad Serebrennikov via cfe-commits
@@ -649,15 +649,15 @@ namespace cwg241 { // cwg241: 9 A::g<3>(b); C::f<3>(b); // expected-error@-1 {{no matching function for call to 'f'}} -// expected-note@#cwg241-C-f {{candidate template ignored: invalid explicitly-specified argument for template paramete

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

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

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-26 Thread Vlad Serebrennikov via cfe-commits
@@ -649,15 +649,15 @@ namespace cwg241 { // cwg241: 9 A::g<3>(b); C::f<3>(b); // expected-error@-1 {{no matching function for call to 'f'}} -// expected-note@#cwg241-C-f {{candidate template ignored: invalid explicitly-specified argument for template paramete

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: The way you applied changes to C++ DR tests is good, but I think the diagnostic message would benefit from further wordsmithing. https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-co

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

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

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

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

[clang] [Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (PR #124793)

2025-01-28 Thread Vlad Serebrennikov via cfe-commits
@@ -4861,8 +4861,9 @@ static void TryListInitialization(Sema &S, S.Context.hasSameUnqualifiedType(SubInit[0]->getType(), DestType) && "Deduced to other type?"); TryArrayCopy(S, - InitializationKind::CreateCopy(Kind.getLocatio

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

2025-01-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/124844 This patch implements the rule described in N5001.[[over.match.best]/4](https://eel.is/c++draft/over.match.best#general-4): > If the best viable function resolves to a function for which multiple > declarations

[clang] [clang] NFC: cleanup check template argument (PR #124668)

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

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

2025-01-28 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/14] [clang] Diagnose default arguments defined in differe

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

2025-01-28 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/13] [clang] Diagnose default arguments defined in differe

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

2025-01-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: During offline discussion with Corentin he pointed out that [over.match.best]/4 talks about multiple declarations that are _found_, and not simply reachable, like my implementation currently assumes. I'll update it to take the results of name lookup into account. https://github

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

2025-01-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I find the doc somewhat hand-wavy, but that's fine. https://github.com/llvm/llvm-project/pull/124997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

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

2025-01-29 Thread Vlad Serebrennikov via cfe-commits
@@ -710,7 +710,7 @@ Before Clang 19, a change in BMI of any (transitive) dependency would cause the outputs of the BMI to change. Starting with Clang 19, changes to non-direct dependencies should not directly affect the output BMI, unless they affect the results of the compila

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

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

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

2025-01-29 Thread Vlad Serebrennikov via cfe-commits
@@ -488,6 +490,20 @@ bool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, continue; } +if (PrevForDefaultArgs->getLexicalDeclContext()->getPrimaryContext() != +ScopeDC->getPrimaryContext() && +!New->isCXXClassMember()) +

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

2025-01-29 Thread Vlad Serebrennikov via cfe-commits
@@ -10960,6 +10960,10 @@ OverloadCandidateSet::BestViableFunction(Sema &S, SourceLocation Loc, S.diagnoseEquivalentInternalLinkageDeclarations(Loc, Best->Function, EquivalentCands); + // [over.match.best]/4 is checked f

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

2025-01-29 Thread Vlad Serebrennikov via cfe-commits
@@ -27,3 +27,23 @@ extern double(*func2)( P_1(int u) P_1(int v) // expected-error {{too many function parameters; subsequent parameters will be ignored}} int w); + +#define PD_10(x) x, x, x, x, x, x, x, x, x, x, +#define PD_100(x) PD_10(x) PD_10(x) PD_10(x) PD_10

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

2025-01-29 Thread Vlad Serebrennikov via cfe-commits
@@ -73,6 +73,11 @@ C++17 Feature Support Resolutions to C++ Defect Reports ^ +- Clang now diagnoses ambiguous default arguments declared in different scopes + when calling functions, implementing [over.match.best] p4. + (`CWG1: What if two usi

[clang] [clang] Add test for CWG170 "Pointer-to-member conversions" (PR #121667)

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

[clang] [WIP][Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I don't feel qualified to review this, but I appreciate that you fix holes in my original quite naive implementation. https://github.com/llvm/llvm-project/pull/122726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

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

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Looking at diagnostics in the test you add, I wonder why don't we issue them, and especially the fixit, when we parse bit-field declaration. Why waiting until assignment happens? https://github.com/llvm/llvm-project/pull/116785 ___ cfe

[clang] [clang] Add test for CWG794 "Base-derived conversion in member type of pointer-to-member conversion" (PR #121660)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121660 This patch adds a test for [CWG794](https://cplusplus.github.io/CWG/issues/794.html), which is an NB comment closed as NAD. Author was asked to bring a paper to Evolution, which never happened. So we test for

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

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > and I thought making just preferred_type warnings early would be especially > insane :D I don't necessarily agree. `preferred_type` is a relatively new thing, so we can try doing something new here. > [edit: I just realized even that might need to be an option because I can

[clang] [clang] Add test for CWG170 "Pointer-to-member conversions" (PR #121667)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121667 This patch adds test for [CWG170](https://cplusplus.github.io/CWG/issues/170.html). The resolution adds explicit undefined behavior, so I think the best we can do is to put the test into constexpr evaluator. C

[clang] [clang] Add test for CWG190 "Layout-compatible POD-struct types" (PR #121668)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121668 This patch adds test for [CWG190](https://cplusplus.github.io/CWG/issues/190.html), leveraging `__is_layout_compatible` intrinsic added for C++20 `std::is_layout_compatible`. I conservatively set the status to

[clang] [clang] Update C++ DR status page (PR #121642)

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

[clang] [clang] Add test for CWG190 "Layout-compatible POD-struct types" (PR #121668)

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

[clang] [clang] Update C++ DR status page (PR #121642)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121642 This patch brings our C++ DR status page up to date with WG21 updates. [CWG1223](https://cplusplus.github.io/CWG/issues/1223.html) "Syntactic disambiguation and _trailing-return-types_" is resolved by [P2915R0

[clang] [clang] Update C++ DR status page (PR #121642)

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

[clang] f53abc2 - [clang][NFC] Refactor expected directives in CWG2881 test

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

[clang] [clang] Add test for CWG192 "Name lookup in parameters" (PR #121679)

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

[clang] [clang] Add test for CWG794 "Base-derived conversion in member type of pointer-to-member conversion" (PR #121660)

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

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121687 This patch adds test for [CWG203](https://cplusplus.github.io/CWG/issues/203.html). Author was asking to change the type of pointer-to-member expression to be closer to how it's written as opposed to where the

[clang] [clang] Add test for CWG156 "Name lookup for conversion functions" (PR #121654)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/121654 >From dcd29ca8c77e24c532ca8300a7e46f5498ffebbb Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 4 Jan 2025 19:37:46 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG156 "Name lookup for conversion

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/121687 >From bca2bfe17b71faeebf65eba11adcb70927f878fd Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 5 Jan 2025 13:58:16 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG203 "Type of address-of-member

[clang] [clang][NFC] Make all C++ DR tests run in full range of language modes (PR #121688)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121688 This patch plugs holes in RUN lines in C++ DR tests, making sure they are run in C++98 through C++26, with the exception of C++03, which in Clang is synonymous to C++98. >From d6e8b78f2209c4bc29d47b8d196ec9ec9

[clang] [clang] Add tests from CWG156 to CWG1111 (dual-scope lookup for conversion-function-ids) (PR #121654)

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

[clang] [clang] Add tests from CWG156 to CWG1111 (dual-scope lookup for conversion-function-ids) (PR #121654)

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

[clang] [clang] Add tests from CWG156 to CWG1111 (dual-scope lookup for conversion-function-ids) (PR #121654)

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

[clang] 743c84b - [clang][NFC] Move CWG2353 test to its own file

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-05T20:46:23+03:00 New Revision: 743c84bb9b79ed70d9bed926c2a173db3b30f587 URL: https://github.com/llvm/llvm-project/commit/743c84bb9b79ed70d9bed926c2a173db3b30f587 DIFF: https://github.com/llvm/llvm-project/commit/743c84bb9b79ed70d9bed926c2a173db3b30f587.

[clang] [clang] Add test for CWG192 "Name lookup in parameters" (PR #121679)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121679 This patch adds a rather simple test for [CWG192](https://cplusplus.github.io/CWG/issues/192.html). Parameter declarations of member functions are not complete-class contexts (unlike default arguments), so the

[clang] [clang][NFC] Make all C++ DR tests run in full range of language modes (PR #121688)

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

[clang] [clang] Add test for CWG156 "Name lookup for conversion functions" (PR #121654)

2025-01-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121654 This patch adds test for [CWG156](https://cplusplus.github.io/CWG/issues/156.html). The most relevant piece of current wording is [[basic.lookup.unqual]/5](https://eel.is/c++draft/basic.lookup#unqual-5): > An

[clang] [clang] Add test for CWG156 "Name lookup for conversion functions" (PR #121654)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
@@ -922,6 +922,49 @@ namespace cwg155 { // cwg155: dup 632 // expected-warning@-1 {{braces around scalar initializer}} } +namespace cwg156 { // cwg156: partial +namespace ex1 { +struct A { + operator int(); +} a; +void foo() { + typedef int T; + a.operator T(); // T is fo

[clang] [clang] Add test for CWG156 "Name lookup for conversion functions" (PR #121654)

2025-01-05 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I wonder if we just mark that as superseded and/or N/A. To do that, we need to downgrade CWG from being available in Clang 3.2 to "partial", and merge in at least the test that doesn't pass. Maybe we should do that anyway. > The original requirements that lookup must find

[clang] [clang] Added warn-assignment-bool-context (PR #115234)

2025-01-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'm sorry it took us a while. The first step is to get the PR out of draft state. https://github.com/llvm/llvm-project/pull/115234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [Clang] Reapply CWG2369 "Ordering between constraints and substitution" (PR #122423)

2025-01-15 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This was discussed during Clang C/C++ Language Working Group meeting today, and the consensus seems that this PR shouldn't land before Clang 20 branch, which is scheduled to happen on January 28th. https://github.com/llvm/llvm-project/pull/122423

[clang] [Clang] Implement CWG 2628 "Implicit deduction guides should propagate constraints" (PR #111143)

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

[clang] [clang][docs] Fix DR status for P2280R4 (PR #127166)

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

[clang] [clang][docs] Fix DR status for P2280R4 (PR #127166)

2025-02-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I'd like to see a test that checks that it's available in C++23 but not C++20 (with a fixme on this). You can also point me out to an existing one. https://github.com/llvm/llvm-project/pull/127166 ___ cfe-commits

[clang] [clang][docs] Fix DR status for P2280R4 (PR #127166)

2025-02-14 Thread Vlad Serebrennikov via cfe-commits
@@ -510,6 +510,12 @@ C++23 implementation status Yes + + +(12): In Clang 20, this change is not yet retroactively Endilll wrote: ```suggestion (12): This feature is not yet available in C++20 and earlier modes. ``` https://github.com/llvm/llvm-pr

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

2025-02-15 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > edit: looks like release notes were "reset" after cutting rc (?) Yes, this happens every time a release branch is created. I checked your release notes, they seem fine to me. https://github.com/llvm/llvm-project/pull/123539 ___ cfe-co

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

2025-02-15 Thread Vlad Serebrennikov via cfe-commits
@@ -54,6 +54,33 @@ unsigned clang_visitCXXBaseClasses(CXType PT, CXFieldVisitor visitor, return true; } +unsigned clang_visitCXXMethods(CXType PT, CXFieldVisitor visitor, + CXClientData client_data) { + CXCursor PC = clang_getTypeDeclaration(P

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

2025-02-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Seems fine to me, but I'd like @AaronBallman to take a look, too, because libclang doesn't have a dedicated maintainer and I'm not familiar enough with it to sign off new functions we add to it. https://github.com/llvm/llvm-project/pull/123539

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

2025-02-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited 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] f157365 - [clang][NFC] Bump latest release number for C++ DR status page

2025-03-19 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-03-20T01:58:55+03:00 New Revision: f157365a0b0f1dab12f7e8fcbf603a232e611792 URL: https://github.com/llvm/llvm-project/commit/f157365a0b0f1dab12f7e8fcbf603a232e611792 DIFF: https://github.com/llvm/llvm-project/commit/f157365a0b0f1dab12f7e8fcbf603a232e611792.

[clang] [libclang/python] Change all global variables to snake case (PR #132378)

2025-03-21 Thread Vlad Serebrennikov via cfe-commits
@@ -10,7 +10,7 @@ import sys from pathlib import Path -kInputsDir = os.path.join(os.path.dirname(__file__), "INPUTS") +k_inputs_dir = os.path.join(os.path.dirname(__file__), "INPUTS") Endilll wrote: "Konstant", I guess https://github.com/llvm/llvm-project/pu

[clang] [libclang/python] Change all global variables to snake case (PR #132378)

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

[clang] [Clang] [NFC] Introduce helpers for defining compatibilty warnings (PR #132129)

2025-03-20 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/132129 ___ 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-03-20 Thread Vlad Serebrennikov via cfe-commits
@@ -1,12 +1,13 @@ import os -from clang.cindex import Config, File, Index +from clang.cindex import Config, File, Index, TranslationUnit if "CLANG_LIBRARY_PATH" in os.environ: Config.set_library_path(os.environ["CLANG_LIBRARY_PATH"]) import unittest +kInputsDir = o

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

2025-03-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited 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] [clang-tools-extra] Revert "[clang] improve class type sugar preservation in pointers to members" (PR #132215)

2025-03-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > This missed updating lldb, which we didn't notice due to lack of pre-commit > CI. This is unfortunate, because lack of lldb testing on clang changes was a temporary measure that has been in effect for 8 months at this point (#95537). https://github.com/llvm/llvm-project/pull/

[clang] [libclang/python] Change all global variables to snake case (PR #132378)

2025-03-21 Thread Vlad Serebrennikov via cfe-commits
@@ -10,7 +10,7 @@ import sys from pathlib import Path -kInputsDir = os.path.join(os.path.dirname(__file__), "INPUTS") +k_inputs_dir = os.path.join(os.path.dirname(__file__), "INPUTS") Endilll wrote: Can you also drop `k_` prefix? According to PEP 8, naming co

[clang] [libclang/python] Change all global variables to snake case (PR #132378)

2025-03-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/132378 ___ 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-03-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited 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] Change all global variables to snake case (PR #132378)

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

[clang] [libclang/python] Change all global variables to snake case (PR #132378)

2025-03-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I was pointed out that there is a separate rule that constants are supposed to be in `SCREAMING_CAPS` (https://peps.python.org/pep-0008/#constants). We should've changed the names (`k` prefix is out of place anyway), but not to `snake_case` as I implied. https://github.com/llvm

[clang] [libclang/python] Change all global variables to snake case (PR #132378)

2025-03-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Sorry for the churn https://github.com/llvm/llvm-project/pull/132378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)

2025-03-17 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,95 @@ +// RUN: %clang_cc1 -verify=expected,c2y -pedantic -std=c2y %s +// RUN: %clang_cc1 -verify=expected,c2y,compat -Wpre-c2y-compat -std=c2y %s +// RUN: %clang_cc1 -verify=expected,ext -pedantic -std=c23 %s +// RUN: %clang_cc1 -verify=expected,ext -pedantic -x c++ -Wn

[clang] [clang] Enforce UTF-8 in `make_cxx_dr_status` (PR #131816)

2025-03-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/131816 Otherwise Windows users have troubles with lexer tests that use emojis. >From e7b2dc54e409f43df1f1e0bf17ec2f06ce61be42 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 18 Mar 2025 18:04:04 +0300 Sub

[clang] [clang] Enforce UTF-8 in `make_cxx_dr_status` (PR #131816)

2025-03-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: #131812 is needed to successfully run the script. https://github.com/llvm/llvm-project/pull/131816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Suppress pedantic diagnostic for a file not ending in EOL (PR #131794)

2025-03-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Both #131812 and #131816 have been merged, so you can update your branch and run the script. https://github.com/llvm/llvm-project/pull/131794 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [clang] Enforce UTF-8 in `make_cxx_dr_status` (PR #131816)

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

[clang] [clang] Enforce UTF-8 in `make_cxx_dr_status` (PR #131816)

2025-03-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/131816 >From e7b2dc54e409f43df1f1e0bf17ec2f06ce61be42 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 18 Mar 2025 18:04:04 +0300 Subject: [PATCH] [clang] Enforce UTF-8 in `make_cxx_dr_status` Otherwise Wi

[clang] [clang] Auto-detect which newline style to use for `cxx_dr_status.html` (PR #132045)

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

[clang] [clang] Auto-detect which newline style to use for cxx_dr_status.html (PR #132045)

2025-03-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/132045 Aaron reported that `make_cxx_dr_status` replaces all newlines in `cxx_dr_status.html`, which makes for a huge diff. On Windows, we can't be compatible with all `autocrlf` modes at once, so this patch adds auto

[clang] [clang] Implement CWG2815 (PR #132778)

2025-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -47,6 +47,28 @@ void f() { #endif } // namespace cwg2813 +namespace cwg2815 { // cwg2815: 21 +#if __cpp_noexcept_function_type >= 201510 Endilll wrote: Yes, C++ DR tests are concerned with language modes, and not individual features. https://github.com/l

[clang] [clang] Auto-detect which newline style to use for `cxx_dr_status.html` (PR #132045)

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

[clang] 70a2075 - [clang] Update C++ DR status page

2025-04-05 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-04-05T10:45:51+03:00 New Revision: 70a20757e8fff0a56cd7f95c2854b0fa68e7089c URL: https://github.com/llvm/llvm-project/commit/70a20757e8fff0a56cd7f95c2854b0fa68e7089c DIFF: https://github.com/llvm/llvm-project/commit/70a20757e8fff0a56cd7f95c2854b0fa68e7089c.

[clang] [libclang/python] Add some bindings to the `Cursor` interface (PR #132377)

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

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-27 Thread Vlad Serebrennikov via cfe-commits
@@ -1073,6 +1073,35 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-27 Thread Vlad Serebrennikov via cfe-commits
@@ -1073,6 +1073,35 @@ inputs. Here is some example of ``$``-prefixed options: Language and Target-Independent Features +Freestanding Builds +--- +Passing the ``-ffreestanding`` flag causes Clang to build for a freestand

[clang] [clang] Implement CWG2803 and CWG2958 (PR #132779)

2025-04-09 Thread Vlad Serebrennikov via cfe-commits
@@ -6,6 +6,89 @@ // RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected,since-cxx11,cxx11-23,since-cxx20,since-cxx23 %s // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected,since-cxx11,since-cxx20,since-cxx23,since-cxx26 %s +namespace cwg2803 { // cwg2803

[clang] [clang] Implement CWG2815 (PR #132778)

2025-04-09 Thread Vlad Serebrennikov via cfe-commits
@@ -47,6 +47,31 @@ void f() { #endif } // namespace cwg2813 +namespace cwg2815 { // cwg2815: 21 +#if __cplusplus >= 201703L +int arg() noexcept; + +int f(int (&)() noexcept); +void f(int (&)()); +int i = f(arg); + +int g(int (*)() noexcept); +void g(int (&)()); +int j = g(arg)

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It's not clear to me why the example in the PR description should be rejected, given https://eel.is/c++draft/dcl.enum#12.sentence-1. I also don't see a clear consensus on CWG reflector to determine whether this change moves us in the right direction. Do we have to change status

<    16   17   18   19   20   21   22   23   24   >