[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: Given that you're

[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: > Since the core i

[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] Add test for CWG2149 "Brace elision and array length deduction" (PR #90079)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -12702,7 +12702,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/2149.html";>2149 drafting Brace elision and array length deduction -Not resolved +Not Resolved* Endilll wrote: As I mentioned in https

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

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,77 @@ +// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify=expected,cxx98 -fexceptions -fcxx-exceptions -pedantic-errors -ast-dump | FileCheck %s --check-prefixes CXX98 +// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify=expec

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

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

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/90220 Fixes #89544 >From b9b17fa34dab666e4c77dad9cd4109f7a88d1c2e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 26 Apr 2024 18:03:44 +0300 Subject: [PATCH] [clang] Fix crash when destructor definition i

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I have a vague feeling I might be fixing the symptom instead of the cause. https://github.com/llvm/llvm-project/pull/90220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/90220 >From b9b17fa34dab666e4c77dad9cd4109f7a88d1c2e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 26 Apr 2024 18:03:44 +0300 Subject: [PATCH 1/2] [clang] Fix crash when destructor definition is preceded

[clang] Revise the modules document for clarity (PR #90237)

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

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -400,24 +389,27 @@ And the compilation process for module units are like: mod1.cppm -> clang++ mod1.cppm ... -> mod1.pcm --,--> clang++ mod1.pcm ... -> mod1.o -+ src2.cpp +> clang++ src2.cpp ---> sr

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -312,75 +300,76 @@ So all of the following name is not valid by default: __test // and so on ... -If you still want to use the reserved module names for any reason, use -``-Wno-reserved-module-identifier`` to suppress the warning. +Using a reserved module name is st

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I have to admit that is rather shallow due to sheer amount of text, but it still took me more like 90 minutes. Hope you find it useful. https://github.com/llvm/llvm-project/pull/90237 ___ cfe-commits mailing list

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -95,22 +76,23 @@ In this document, we use the following umbrella terms: * A ``module interface unit`` refers to either a ``primary module interface unit`` or a ``module interface partition unit``. -* An ``importable module unit`` refers to either a ``module interface uni

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -279,8 +266,9 @@ we could put ``-x c++-module`` in front of the file. For example, return 0; } -Now the filename of the ``module interface`` ends with ``.cpp`` instead of ``.cppm``, -we can't compile them by the original command lines. But we are still able to do i

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -8,79 +8,60 @@ Standard C++ Modules Introduction -The term ``modules`` has a lot of meanings. For the users of Clang, modules may -refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``, -etc.) or ``Standard C++ Modules``. The imp

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -633,36 +631,36 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -633,36 +631,36 @@ example: // module M's interface, so is discarded int c = use_h(); // OK -In the above example, the function definition of ``N::g`` is elided from the Reduced -BMI of ``M.cppm``. Then the use of ``use_g`` in

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -925,45 +923,41 @@ In that case, you need to convert your source files (.cpp files) to module imple // Following off should be unchanged. ... -The module implementation unit will import the primary module implicitly. -We don't include any headers in the module implemen

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -432,9 +424,8 @@ The following example is not allowed: $ clang++ -std=c++20 M.cppm --precompile -o M.pcm $ clang++ -std=c++23 Use.cpp -fprebuilt-module-path=. -The compiler would reject the example due to the inconsistent language options. -Not all options are language

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -776,9 +773,9 @@ export-using style using decl_n; } -As the example shows, you need to include all the headers containing declarations needs -to be exported and `using` such declarations in an `export` block. Then, basically, -we're done. +This example shows how to

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -1817,27 +1804,29 @@ But with optimizations, things are different: │ │ └---┘ -It would be very unfortunate if we end up with worse performance after using modules. -Th

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time +performan

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time +performan

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -444,53 +435,57 @@ For example, the following example is allowed: # Inconsistent debugging level. $ clang++ -std=c++20 -g Use.cpp -fprebuilt-module-path=. -Although the two examples have inconsistent optimization and debugging level, both of them are accepted. +Althoug

[clang] Revise the modules document for clarity (PR #90237)

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
@@ -738,22 +736,21 @@ the following style significantly: import M; ... // use declarations from module M. -The key part of the tip is to reduce the duplications from the text includes. +Reducing the duplication from textual includes is what improves compile-time +performan

[clang] [clang-tools-extra] Reapply "[Clang][Sema] Diagnose class member access expressions naming non-existent members of the current instantiation prior to instantiation in the absence of dependent

2024-04-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Changes to `Sema.h` and DR tests look good to me. https://github.com/llvm/llvm-project/pull/90152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use `cwg_index.html` from GitHub for DR status page (PR #90352)

2024-04-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/90352 Currently we're using official publication of CWG issue list available at https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html. Unfortunately, it's not updated as frequently as we sometimes need. For inst

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-27 Thread Vlad Serebrennikov via cfe-commits
@@ -3893,9 +3893,12 @@ namespace { } void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *E) { - if (E->getTemporary()->getDestructor()->isTrivial()) { -Inherited::VisitStmt(E); -return; + if (const CXXDestructorDecl *DtorDecl = +

[clang] [Clang][Sema] Fix a bug on template partial specialization with issue on deduction of nontype tempalte parameter (PR #90376)

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

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I'm fine with the way DR test is written, but I'm not qualified to review the contents on the test, unfortunately. I'd like to point to related Core issues [CWG2836](https://cplusplus.github.io/CWG/issues/2836.html) and [CWG2864](https://cplusplus.github.

[clang] [clang] Use `cwg_index.html` from GitHub for DR status page (PR #90352)

2024-04-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: CI has been failing because of unrelated `Clang :: Driver/amdgpu-toolchain.c` test. I'm merging this as is. https://github.com/llvm/llvm-project/pull/90352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang] Use `cwg_index.html` from GitHub for DR status page (PR #90352)

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

[clang] [clang] Implement CWG2851: floating-point conversions in converted constant expressions (PR #90387)

2024-04-29 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: https://github.com/llvm/llvm-project/pull/90352 has been merged. https://github.com/llvm/llvm-project/pull/90387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow constexpr cast from `void*` in more cases (PR #89484)

2024-04-29 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/89484 >From 5985dbe47e052505278d60628bbb5ca751cc3b6c Mon Sep 17 00:00:00 2001 From: offsetof <131769984+offse...@users.noreply.github.com> Date: Sat, 20 Apr 2024 02:35:09 + Subject: [PATCH 1/2] [clang] Allow constex

[clang] [clang] Allow constexpr cast from `void*` in more cases (PR #89484)

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

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-30 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/90220 >From b9b17fa34dab666e4c77dad9cd4109f7a88d1c2e Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 26 Apr 2024 18:03:44 +0300 Subject: [PATCH 1/3] [clang] Fix crash when destructor definition is preceded

[clang] [clang] Fix crash when destructor definition is preceded with '=' (PR #90220)

2024-04-30 Thread Vlad Serebrennikov via cfe-commits
@@ -3893,9 +3893,12 @@ namespace { } void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *E) { - if (E->getTemporary()->getDestructor()->isTrivial()) { -Inherited::VisitStmt(E); -return; + if (const CXXDestructorDecl *DtorDecl = +

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/106117 This patch covers CWG issues regarding declaration matching when `friend` declarations are involved: [CWG138](https://cplusplus.github.io/CWG/issues/138.html), [CWG386](https://cplusplus.github.io/CWG/issues/3

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/106117 >From 65307bd2f5f8ca5c6aaa24335c77a63280d668e3 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 26 Aug 2024 20:45:31 +0300 Subject: [PATCH 1/2] [clang] Add tests for CWG issues about friend declarati

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/106117 >From 65307bd2f5f8ca5c6aaa24335c77a63280d668e3 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 26 Aug 2024 20:45:31 +0300 Subject: [PATCH 1/3] [clang] Add tests for CWG issues about friend declarati

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

2024-08-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/106299 [CWG2917](https://cplusplus.github.io/CWG/issues/2917.html) got a new proposed resolution that is different from the one the test has been written against. [CWG2922](https://cplusplus.github.io/CWG/issues/2922.

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

2024-08-27 Thread Vlad Serebrennikov via cfe-commits
@@ -33,7 +33,7 @@ void *operator new(std::size_t, void *p) { return p; } void* operator new[] (std::size_t, void* p) {return p;} -namespace cwg2922 { // cwg2922: 20 open 2024-07-10 +namespace cwg2922 { // cwg2922: 20 tentatively ready 2024-07-10 Endilll wrote

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

2024-08-27 Thread Vlad Serebrennikov via cfe-commits
@@ -6,7 +6,7 @@ // RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected %s // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected %s -namespace cwg2917 { // cwg2917: 20 open 2024-07-30 +namespace cwg2917 { // cwg2917: 20 review 2024-07-30 Endi

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

2024-08-27 Thread Vlad Serebrennikov via cfe-commits
@@ -17292,43 +17292,43 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/2913.html";>2913 -open +tentatively ready Grammar for deduction-guide has requires-clause in the wrong position Not resolved https

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

2024-08-27 Thread Vlad Serebrennikov via cfe-commits
@@ -6,7 +6,7 @@ // RUN: %clang_cc1 -std=c++23 -pedantic-errors -verify=expected %s // RUN: %clang_cc1 -std=c++2c -pedantic-errors -verify=expected %s -namespace cwg2917 { // cwg2917: 20 open 2024-07-30 +namespace cwg2917 { // cwg2917: 20 review 2024-07-30 Endi

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

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

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
@@ -2099,6 +2099,70 @@ class Sema final : public SemaBase { bool CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, bool OrNull); + // AssignmentAction - This is used by all the assignment diagnostic functions + // to repr

[clang] [clang] Minor updates to C++ DR page design (PR #106360)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/106360 This patch updates `make_cxx_dr_status` script to use the same spoiler-like way to hide additional details that `cxx_status.html` uses. This gives implemented yet unresolved DRs new but very familiar look: ![s9

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
@@ -101,6 +101,26 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion, StructWithAnonUnion3) #endif } // namespace cwg2759 +#if __cplusplus >= 202002L +namespace cwg2770 { // cwg2770: 20 +template +struct B { + static_assert(sizeof(T) == 1); + using type = int; +};

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
@@ -568,6 +568,80 @@ namespace cwg137 { // cwg137: yes const volatile int *cvqcv = static_cast(cvp); } +namespace cwg138 { // cwg138: partial +namespace example1 { +void foo(); // #cwg138-ex1-foo +namespace A { + using example1::foo; // #cwg138-ex1-using + class X { +s

[clang] [clang] Minor updates to C++ DR page design (PR #106360)

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

[clang] [Clang][AST] Add Test Cases for Reference Qualifiers in Opr Overload (PR #102878)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @cor3ntin The solution here #79748 doesn't pass the test too. Kinda expected > not to pass the test clang If tests are not intended to pass, you should expect the diagnostics we issue today, and leave FIXMEs appropriately to indicate where Clang's behavior is wrong. https://

[clang] [Clang][AST] Add Test Cases for Reference Qualifiers in Opr Overload (PR #102878)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Here's an example: https://github.com/llvm/llvm-project/blob/114ff99e93edd699fd94cf2a84de75e8845fc76b/clang/test/CXX/drs/cwg10xx.cpp#L85-L90 https://github.com/llvm/llvm-project/pull/102878 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [NFC][Sema] Move `Sema::AssignmentAction` into its own scoped enum (PR #106453)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
@@ -204,6 +204,24 @@ class SemaPPCallbacks; class TemplateDeductionInfo; } // namespace sema +// AssignmentAction - This is used by all the assignment diagnostic functions +// to represent what is actually causing the operation +enum class AssignmentAction : unsigned { ---

[clang] [NFC][Sema] Move `Sema::AssignmentAction` into its own scoped enum (PR #106453)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll This is my attempt at implementing what you asked for in [#106321 > (comment)](https://github.com/llvm/llvm-project/pull/106321#discussion_r1734379624) > > I'm not a huge fan of this as I think this will be extremely annoying for > downstream forks with very little up

[clang] [NFC][Sema] Move `Sema::AssignmentAction` into its own scoped enum (PR #106453)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
@@ -204,6 +204,24 @@ class SemaPPCallbacks; class TemplateDeductionInfo; } // namespace sema +// AssignmentAction - This is used by all the assignment diagnostic functions +// to represent what is actually causing the operation +enum class AssignmentAction : unsigned { + Assi

[clang] [NFC][Sema] Move `Sema::AssignmentAction` into its own scoped enum (PR #106453)

2024-08-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Thank you for resolving your issue the hard way, and paying some of the technical debt we accumulated over the years. https://github.com/llvm/llvm-project/pull/106453 ___ cfe-commits mailing list

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

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

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/106117 >From 65307bd2f5f8ca5c6aaa24335c77a63280d668e3 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 26 Aug 2024 20:45:31 +0300 Subject: [PATCH 1/5] [clang] Add tests for CWG issues about friend declarati

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

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

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @cor3ntin Can you take another look? I added CWG1900 section to the PR description. Nothing has changes for other Core issues. https://github.com/llvm/llvm-project/pull/106117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

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

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

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

[clang] [clang] Add tests for CWG issues about friend declaration matching (PR #106117)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The failure is unrelated. https://github.com/llvm/llvm-project/pull/106117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add tests for CWG issues about language linkage (PR #107019)

2024-09-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/107019 This patch covers Core issues about language linkage during declaration matching resolved in [P1787R6](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1787r6.html), namely [CWG563](https://cplusplus.

[clang] [clang] Add test for CWG2486 (`noexcept` and function pointer conversion) (PR #107131)

2024-09-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/107131 [CWG2486](https://cplusplus.github.io/CWG/issues/2486.html) "Call to `noexcept` function via `noexcept(false)` pointer/lvalue" allows `noexcept` functions to be called via `noexcept(false)` pointers or values.

[clang] Fix erroneous `-Wmissing-prototypes` for Win32 entry points (PR #98105)

2024-07-09 Thread Vlad Serebrennikov via cfe-commits
@@ -654,6 +654,9 @@ Improvements to Clang's diagnostics - Clang now shows implicit deduction guides when diagnosing overload resolution failure. #GH92393. +- Clong no longer emits a no previous prototype warning for Win32 entry points under ``-Wmissing-prototypes``. ---

[clang] [clang] fix sema init crash for not checking a ExprResult (PR #98102)

2024-07-10 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll you are able to reduce that further? I don't see the original reproducer anywhere. Snippet in the description is already reduced (and got quite damaged in the process). I can reduce it myself if someone point me out to the original reproducer https://github.com/llvm/

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

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Sorry for not getting back to you earlier. https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
@@ -611,51 +612,25 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration: +class BaseEnumeration(Enum): """ Common base class for named enumerations held in sync with Index.h values. - -Subclasses must define their own _kinds and _name_map me

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

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll do you think this can be merged now? After CI passes. https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @DeinAlptraum This is also worth a release note, I think. https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The refactoring itself is worth mentioning in potentially breaking changes, because this covers a significant surface of our Python API. https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm

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

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
@@ -142,6 +142,7 @@ Clang Python Bindings Potentially Breaking Changes of variant 271. - Renamed ``TypeKind`` variant 162 from ``OBJCCLASS`` to ``OBJCTYPEPARAM``. The previous name was incorrect, it was a duplicate of variant 28. +- Refactored enum usage, switching to the s

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

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

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

2024-07-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I think this should be rebased on top of #95608 once it lands (soon). CC @DeinAlptraum https://github.com/llvm/llvm-project/pull/98489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [libcxx] [llvm] Reapply "[Clang] Implement resolution for CWG1835 (#92957)" (PR #98547)

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

[clang] [Clang][AST] Move NamespaceDecl bits to DeclContext (PR #98567)

2024-07-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Worth noting I've been investigating in the background whether we can do the opposite transformation, i.e. move members of `*Bits` back to their respective classes without increasing size of AST nodes. If anything, for the sake of debugging experience. The prototype is here: htt

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

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

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

2024-07-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: #95608 has been merged. https://github.com/llvm/llvm-project/pull/98489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-07-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Python part seems fine to me, but I'd like @DeinAlptraum to confirm that. https://github.com/llvm/llvm-project/pull/98489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

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

2024-07-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/98622 Apparently we can't assume that `AutoTypeLoc` from `AutoType` is always valid. Fixes #98164 >From 5310764fb4044bcd4229434e80b64870c4b4ee8c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 12 Jul 202

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

2024-07-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Do you have an idea as to why the type location is invalid in the first place? Looking at the new test, my guess is that `auto` remains undeduced, so it has nowhere to point out to. https://github.com/llvm/llvm-project/pull/98622 ___

[clang] [clang-tools-extra] [Clang][AST] Move NamespaceDecl bits to DeclContext (PR #98567)

2024-07-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll Should I go ahead with this change anyways? I would prefer if you can reduce the scope of the PR by avoiding the introduction of `NamespaceDeclBits` (it looks like you do more than just that). But if you feel strongly about it, I don't want to hold you off because of

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

2024-07-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/98736 This patch implements consensus on the corresponding RFC documented here: https://discourse.llvm.org/t/rfc-deprecate-ofast/78687/72 Specifically, I added a deprecation warning for `-Ofast`, that suggests to use

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

2024-07-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited 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-13 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 when destructor definition is preceded with '=' (PR #90220)

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

[clang] [Clang][Sema] Explicit template arguments are not substituted into the exception specification of a function (PR #90760)

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

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

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

[clang] [clang] Implement provisional wording for CWG2398 regarding packs (PR #90820)

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

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