[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
@@ -1180,6 +1180,16 @@ void Sema::PrintPragmaAttributeInstantiationPoint() { diag::note_pragma_attribute_applied_decl_here); } +void Sema::DiagnoseExcessPrecision() { + if (NumExcessPrecisionNotSatisfied > 0) { +for (auto &[Loc, Type, Num] : ExcessPrecision

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

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

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
@@ -626,6 +626,11 @@ class Sema final : public SemaBase { const llvm::MapVector & getMismatchingDeleteExpressions() const; + std::vector> + ExcessPrecisionNotSatisfied; Endilll wrote: Or `(Num >1 ? 1 : 0)` if you wany https://github.com/llvm/llvm-p

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

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

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

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

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Any chance you were able to test those changes? https://github.com/llvm/llvm-project/pull/105490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
@@ -2454,7 +2480,7 @@ def element_type(self): If accessed on a type that is not an array, complex, or vector type, an exception will be raised. """ -result = conf.lib.clang_getElementType(self) +result = Type.from_result(conf.lib.clang_ge

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
@@ -3743,82 +3765,62 @@ def write_main_file_to_stdout(self): ("clang_equalLocations", [SourceLocation, SourceLocation], bool), ("clang_equalRanges", [SourceRange, SourceRange], bool), ("clang_equalTypes", [Type, Type], bool), -("clang_formatDiagnostic", [Diagnos

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

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

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
@@ -3524,16 +3564,20 @@ def getCompileCommands(self, filename): Get an iterable object providing all the CompileCommands available to build filename. Returns None if filename is not found in the database. """ -return conf.lib.clang_CompilationDat

[clang] [libclang/python] Do not rely on `ctypes`' `errcheck` (PR #105490)

2024-09-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Should I add tests for all of these first, and then merge that into this PR? That would be nice! https://github.com/llvm/llvm-project/pull/105490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Clang] Reject `this void` explicit object parameters (CWG2915) (PR #108817)

2024-09-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM, but it would be nice for @cor3ntin to rubber-stamp it before merging. https://github.com/llvm/llvm-project/pull/108817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang] Add test for CWG110 "Can template functions and classes be declared in the same scope?" (PR #111446)

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

[clang] [clang] Add test for CWG110 "Can template functions and classes be declared in the same scope?" (PR #111446)

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

[clang] [clang] Add test for CWG110 "Can template functions and classes be declared in the same scope?" (PR #111446)

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

[clang] [clang][python] Don't add check-clang-python to check-all if cross-compiling (PR #111657)

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

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

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

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [clang][python] Add CLANG_DISABLE_RUN_PYTHON_TESTS CMake option to disable clang python bindings tests (PR #111367)

2024-10-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > > We already have hard-coded logic to disable adding these tests to the > > > `check-all` target in various cases. > > > > > > Why do you have to do that? > > I've never worked with the clang python bindings before, but you can > basically see the reasoning in > https://g

[clang] [clang] Catch missing format attributes (PR #105479)

2024-10-09 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,251 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c_diagnostics -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -Wmissing-format-attribute -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -verify=ex

[clang] [clang][python] Add CLANG_DISABLE_RUN_PYTHON_TESTS CMake option to disable clang python bindings tests (PR #111367)

2024-10-09 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Though now I write this, I'm thinking it would make more sense to set > RUN_PYTHON_TESTS to FALSE if CMAKE_CROSSCOMPILING is set. What do you think? Yes, I like this direction much more. Probably you should also print a message during configuration saying that those tests are

[clang] [clang][python] Don't add check-clang-python to check-all if cross-compiling (PR #111657)

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

[clang] [clang][python] Don't add check-clang-python to check-all if cross-compiling (PR #111657)

2024-10-09 Thread Vlad Serebrennikov via cfe-commits
@@ -47,6 +47,14 @@ if(${LLVM_NATIVE_ARCH} MATCHES "^(AArch64|Hexagon|Sparc|SystemZ)$") set(RUN_PYTHON_TESTS FALSE) endif() +# Tests will fail if cross-compiling for a different target, as tests will try +# to use the host Python3_EXECUTABLE and make FFI calls to functions i

[clang] [clang] Catch missing format attributes (PR #105479)

2024-10-09 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,251 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,c_diagnostics -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -Wmissing-format-attribute -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 -fsyntax-only -x c++ -verify=ex

[clang] [clang][python] Don't add check-clang-python to check-all if cross-compiling (PR #111657)

2024-10-09 Thread Vlad Serebrennikov via cfe-commits
@@ -47,6 +47,14 @@ if(${LLVM_NATIVE_ARCH} MATCHES "^(AArch64|Hexagon|Sparc|SystemZ)$") set(RUN_PYTHON_TESTS FALSE) endif() +# Tests will fail if cross-compiling for a different target, as tests will try +# to use the host Python3_EXECUTABLE and make FFI calls to functions i

[clang] 8bb12ca - [clang][NFC] Update `cxx_dr_status.html`

2024-10-11 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-10-11T11:17:44+03:00 New Revision: 8bb12ca28f7f195aa483fdb5921681ec373564ab URL: https://github.com/llvm/llvm-project/commit/8bb12ca28f7f195aa483fdb5921681ec373564ab DIFF: https://github.com/llvm/llvm-project/commit/8bb12ca28f7f195aa483fdb5921681ec373564ab.

[clang] [clang][python] Add CLANG_DISABLE_RUN_PYTHON_TESTS CMake option to disable clang python bindings tests (PR #111367)

2024-10-08 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > We already have hard-coded logic to disable adding these tests to the > `check-all` target in various cases. Why do you have to do that? https://github.com/llvm/llvm-project/pull/111367 ___ cfe-commits mailing list cfe-commits@lists.

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-04 Thread Vlad Serebrennikov via cfe-commits
@@ -99,6 +99,20 @@ C++ Specific Potentially Breaking Changes // Was error, now evaluates to false. constexpr bool b = f() == g(); +- The warning ``-Wdeprecated-literal-operator`` is now on by default, as this is + something that WG21 has shown interest in removing fr

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I'm happy that we stop issuing diagnostics that contradict each other. https://github.com/llvm/llvm-project/pull/111027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

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

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

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

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
@@ -1009,18 +1012,20 @@ namespace cwg355 { struct ::cwg355_S s; } // cwg356: na namespace cwg357 { // cwg357: yes - template struct A { + template struct A { // #cwg357-A void f() const; // #cwg357-f }; template void A::f() {} // expected-error@-1 {{out-of-line

[clang] [Clang] Emit a diagnostic note at the class declaration when the method definition does not match any declaration. (PR #110638)

2024-10-02 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: LGTM otherwise https://github.com/llvm/llvm-project/pull/110638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add test for CWG110 "Can template functions and classes be declared in the same scope?" (PR #111446)

2024-10-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/111446 [P1787R6](https://wg21.link/p1787r6): > [CWG110](https://cplusplus.github.io/CWG/issues/110.html) is resolved by > reducing the restriction in [temp.pre] to a note (matching the behavior of > GCC, Clang, and IC

[clang] [clang] Add covariance tests that make sure we return an error when return value is different in pointer / lvalue ref / rvalue ref (PR #112853)

2024-10-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. You should write a test in `clang/test/CXX/drs/cwg0xx.cpp`, possibly by moving the test you've written there. While doing that, you should follow the example of other tests in that file, which includes the way `expected` directi

[clang] [clang] Add covariance tests that make sure we return an error when return value is different in pointer / lvalue ref / rvalue ref (PR #112853)

2024-10-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Can you merge `main` into your branch? I think that should fix the CI failures. https://github.com/llvm/llvm-project/pull/112853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang] Add covariance tests that make sure we return an error when return value is different in pointer / lvalue ref / rvalue ref (PR #112853)

2024-10-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > clang/www/make_cxx_dr_status seems to generate a lot of unrelated changes, so > perhaps a separate pull request would make sense if we want to update > cxx_dr_status.html. Ignore other changes; just include the one that updates CWG960 status. I'll update the rest as an NFC cha

[clang] [clang] Add covariance tests that make sure we return an error when return value is different in pointer / lvalue ref / rvalue ref (PR #112853)

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

[clang] [clang] Add covariance tests that make sure we return an error when return value is different in pointer / lvalue ref / rvalue ref (PR #112853)

2024-10-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I left suggestions for one of the errors you're expecting. You should apply those to the rest of expected directives. https://github.com/llvm/llvm-project/pull/112853 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang] Add covariance tests that make sure we return an error when return value is different in pointer / lvalue ref / rvalue ref (PR #112853)

2024-10-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Do you even need to change anything in this file now? https://github.com/llvm/llvm-project/pull/112853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang] Add covariance tests that make sure we return an error when return value is different in pointer / lvalue ref / rvalue ref (PR #112853)

2024-10-21 Thread Vlad Serebrennikov via cfe-commits
@@ -93,6 +93,38 @@ struct B : A { } // namespace example2 } // namespace cwg952 +namespace cwg960 { // cwg960: 2.8 +struct a {}; +class A { +#if __cplusplus >= 201103L + // Check lvalue ref vs rvalue ref vs pointer. + virtual a& rvalue_ref(); + virtual a&& lvalue_ref(); +

[clang] [clang] Add covariance tests that make sure we return an error when return value is different in pointer / lvalue ref / rvalue ref (PR #112853)

2024-10-21 Thread Vlad Serebrennikov via cfe-commits
@@ -93,6 +93,38 @@ struct B : A { } // namespace example2 } // namespace cwg952 +namespace cwg960 { // cwg960: 2.8 +struct a {}; +class A { +#if __cplusplus >= 201103L + // Check lvalue ref vs rvalue ref vs pointer. + virtual a& rvalue_ref(); + virtual a&& lvalue_ref(); +

[clang] [clang] Add covariance tests that make sure we return an error when return value is different in pointer / lvalue ref / rvalue ref (PR #112853)

2024-10-21 Thread Vlad Serebrennikov via cfe-commits
@@ -93,6 +93,38 @@ struct B : A { } // namespace example2 } // namespace cwg952 +namespace cwg960 { // cwg960: 2.8 Endilll wrote: ```suggestion namespace cwg960 { // cwg960: 3.0 ``` https://godbolt.org/z/o77989zM7 https://github.com/llvm/llvm-project/pull/11

[clang] [clang] Add covariance tests that make sure we return an error when return value is different in pointer / lvalue ref / rvalue ref (PR #112853)

2024-10-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Thank you! This is good to go now. https://github.com/llvm/llvm-project/pull/112853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [clang] Add test for CWG110 "Can template functions and classes be declared in the same scope?" (PR #111446)

2024-10-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/111446 >From 9e427888749e7fc77c0302742de971d69c8c2889 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 8 Oct 2024 00:58:48 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG110 --- clang/test/CXX/drs/cwg

[clang] [clang] Add test for CWG110 "Can template functions and classes be declared in the same scope?" (PR #111446)

2024-10-08 Thread Vlad Serebrennikov via cfe-commits
@@ -119,6 +119,16 @@ namespace cwg109 { // cwg109: yes }; } +namespace cwg110 { // cwg110: 2.8 +template +void f(); + +class f; + +template +void f(int); +} // namespace cwg110 Endilll wrote: I updated the test. Does it look good now? https://github.com/

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-03 Thread Vlad Serebrennikov via cfe-commits
@@ -203,6 +203,9 @@ namespace cwg1762 { // cwg1762: 14 float operator ""E(const char *); // since-cxx11-error@-1 {{invalid suffix on literal; C++11 requires a space between literal and identifier}} // since-cxx11-warning@-2 {{user-defined literal suffixes not starting wi

[clang-tools-extra] [clang-tidy] Stop linking against clangSema (PR #113373)

2024-10-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/113373 This is bad layering-wise. The only fix needed now is to anchor `SemaConsumer` vtable, which is also done in this patch. >From 5a227a152392cc0725a1b104c8d7832621a9ec46 Mon Sep 17 00:00:00 2001 From: Vlad Serebr

[clang] [clang][NFC] Move `concepts::createSubstDiagAt` from AST to Sema (PR #113294)

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

[clang-tools-extra] [clang-tidy][NFC] Replace usages of `DeclSpec::TQ` with `Qualifiers::TQ` (PR #113295)

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

[clang-tools-extra] [clang-tidy][NFC] Replace usages of `DeclSpec::TQ` with `Qualifiers::TQ` (PR #113295)

2024-10-22 Thread Vlad Serebrennikov via cfe-commits
@@ -71,15 +72,20 @@ static std::optional fixIfNotDangerous(SourceLocation Loc, // Build a string that can be emitted as FixIt with either a space in before // or after the qualifier, either ' const' or 'const '. -static std::string buildQualifier(DeclSpec::TQ Qualifier, +stat

[clang-tools-extra] [clang-tidy][NFC] Replace usages of `DeclSpec::TQ` with `Qualifiers::TQ` (PR #113295)

2024-10-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/113295 This patch improves, but doens't fully resolve the layering violation, which stems from relying on Sema. There's one function that needs to convert enumerator to a string (`buildQualifier` in `FixItHintUtils.cp

[clang] [clang][NFC] Add test for CWG1898 "Use of “equivalent” in overload resolution" (PR #113439)

2024-10-23 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/113439 [CWG1898](https://cplusplus.github.io/CWG/issues/1898.html) Use of “equivalent” in overload resolution [P1787R6](https://wg21.link/p1787r6): > CWG1898 is resolved by explicitly using the de

[clang] Nominate Vlad Serebrennikov for C++ DRs (PR #114040)

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

[clang] 6bb72de - [clang][NFC] Update cxx_dr_status.html

2024-10-22 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-10-22T12:16:07+03:00 New Revision: 6bb72de75a81e27b2768db767350bcf4ce7d2a2c URL: https://github.com/llvm/llvm-project/commit/6bb72de75a81e27b2768db767350bcf4ce7d2a2c DIFF: https://github.com/llvm/llvm-project/commit/6bb72de75a81e27b2768db767350bcf4ce7d2a2c.

[clang] [clang][NFC] Move `concepts::createSubstDiagAt` from AST to Sema (PR #113294)

2024-10-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/113294 This fixes layering violation introduced in 2fd01d75a863184766ee0c82b5c0fc8be172448a. The declaration is moved to `SemaTemplateInstantiate` section of `Sema.h`, after the file where it's implemented. >From a3

[clang-tools-extra] [clang-tidy][NFC] Replace usages of `DeclSpec::TQ` with `Qualifiers::TQ` (PR #113295)

2024-10-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > However this is a clang-tidy change so you should wait for its maintainers to > approve it It would be nice to know who I'm waiting for, because there are not listed maintainers for clang-tidy. Is it Aaron then? https://github.com/llvm/llvm-project/pull/113295 ___

[clang] [clang][NFC] Move `concepts::createSubstDiagAt` from AST to Sema (PR #113294)

2024-10-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113294 >From a36a7b77b2fbabf29fe69a1e23c60ecfc9a53279 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 22 Oct 2024 13:42:51 +0300 Subject: [PATCH 1/2] [clang][NFC] Move `concepts::createSubstDiagAt` from AS

[clang-tools-extra] [clang-tidy][NFC] Replace usages of `DeclSpec::TQ` with `Qualifiers::TQ` (PR #113295)

2024-10-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113295 >From c618860ee1fc6bbac5d262b8edf5141e7c18d427 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 22 Oct 2024 14:12:37 +0300 Subject: [PATCH 1/2] [clang-tidy][NFC] Replace usages of `DeclSpec::TQ` with

[clang-tools-extra] [clang-tidy][NFC] Replace usages of `DeclSpec::TQ` with `Qualifiers::TQ` (PR #113295)

2024-10-22 Thread Vlad Serebrennikov via cfe-commits
@@ -71,15 +72,20 @@ static std::optional fixIfNotDangerous(SourceLocation Loc, // Build a string that can be emitted as FixIt with either a space in before // or after the qualifier, either ' const' or 'const '. -static std::string buildQualifier(DeclSpec::TQ Qualifier, +stat

[clang] Nominate Shafik Yaghmour and Vlad Serebrennikov for C++ conformance (PR #114071)

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

[clang] [clang][Index][USR][NFC] Allow customizing langopts for USR generation (PR #109574)

2024-10-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll Could you please help me reaching out to the right set of reviewers? Aaron noticed it faster 😄 https://github.com/llvm/llvm-project/pull/109574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] Add Shafik and hstk30 as maintainers for issue triage (PR #114781)

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

[clang] [Clang] Fix name lookup for dependent bases (PR #114978)

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

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113736 >From b23ce76d3db79eab6433bef1bd3fc9d26bcb3309 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 25 Oct 2024 23:05:06 +0300 Subject: [PATCH 1/4] [clang][NFC] Add test for CWG issues about linkage in

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113736 >From b23ce76d3db79eab6433bef1bd3fc9d26bcb3309 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 25 Oct 2024 23:05:06 +0300 Subject: [PATCH 1/5] [clang][NFC] Add test for CWG issues about linkage in

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,548 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file --leading-lines %s %t +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -fexceptions -fcxx-exceptions %t/cwg1884_A.cppm -triple x86_64-unknown-unknown -emit-module-interface -o %t/cwg1884_A.pcm +// RUN: %cl

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,548 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file --leading-lines %s %t +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -fexceptions -fcxx-exceptions %t/cwg1884_A.cppm -triple x86_64-unknown-unknown -emit-module-interface -o %t/cwg1884_A.pcm +// RUN: %cl

[clang] [clang][NFC] Add test for CWG1898 "Use of “equivalent” in overload resolution" (PR #113439)

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

[clang] [clang][NFC] Add test for CWG1898 "Use of “equivalent” in overload resolution" (PR #113439)

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

[clang] [clang][NFC] Add test for CWG1898 "Use of “equivalent” in overload resolution" (PR #113439)

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

[clang] [clang][NFC] Add test for CWG1898 "Use of “equivalent” in overload resolution" (PR #113439)

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

[clang] [clang][NFC] Add test for CWG1898 "Use of “equivalent” in overload resolution" (PR #113439)

2024-10-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113439 >From 467c478cbc2400e1337e6dcc344a96e4a697341a Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 23 Oct 2024 12:59:36 +0300 Subject: [PATCH 1/3] =?UTF-8?q?[clang][NFC]=20Add=20test=20for=20CWG1898?=

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113736 >From b23ce76d3db79eab6433bef1bd3fc9d26bcb3309 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 25 Oct 2024 23:05:06 +0300 Subject: [PATCH 1/5] [clang][NFC] Add test for CWG issues about linkage in

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

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

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

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

[clang-tools-extra] [clang-tidy] Stop linking against clangSema (PR #113373)

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

[clang] [clang][NFC] Add test for CWG1898 "Use of “equivalent” in overload resolution" (PR #113439)

2024-10-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113439 >From 467c478cbc2400e1337e6dcc344a96e4a697341a Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 23 Oct 2024 12:59:36 +0300 Subject: [PATCH 1/2] =?UTF-8?q?[clang][NFC]=20Add=20test=20for=20CWG1898?=

[clang] [clang][NFC] Add test for CWG1898 "Use of “equivalent” in overload resolution" (PR #113439)

2024-10-25 Thread Vlad Serebrennikov via cfe-commits
@@ -640,3 +640,48 @@ namespace H { struct S s; } } + +namespace cwg1898 { // cwg1898: 2.7 +void e(int) {} // #cwg1898-e-int +void e(int) {} +// expected-error@-1 {{redefinition of 'e'}} +// expected-note@#cwg1898-e-int {{previous definition is here}} +void e(long) {} + +voi

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

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

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

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

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,548 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file --leading-lines %s %t +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -fexceptions -fcxx-exceptions %t/cwg1884_A.cppm -triple x86_64-unknown-unknown -emit-module-interface -o %t/cwg1884_A.pcm +// RUN: %cl

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-26 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/113736 >From b23ce76d3db79eab6433bef1bd3fc9d26bcb3309 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 25 Oct 2024 23:05:06 +0300 Subject: [PATCH 1/2] [clang][NFC] Add test for CWG issues about linkage in

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file --leading-lines %s %t +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -fexceptions -fcxx-exceptions %t/cwg279_A.cppm -triple x86_64-unknown-unknown -emit-module-interface -o %t/cwg279_A.pcm +// RUN: %clang

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-26 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: split-file --leading-lines %s %t +// RUN: %clang_cc1 -std=c++20 -pedantic-errors -fexceptions -fcxx-exceptions %t/cwg279_A.cppm -triple x86_64-unknown-unknown -emit-module-interface -o %t/cwg279_A.pcm +// RUN: %clang

[clang] [libclang/python/tests] Clean up imports (PR #114409)

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

[clang] [libclang/python] Clean up tests (PR #114383)

2024-10-31 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Well, you fix of the test is not really functional either, but definitely deserves more attention than the rest of the changes. https://github.com/llvm/llvm-project/pull/114383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [libclang/python] Clean up tests (PR #114383)

2024-10-31 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. Thank you for putting effort into this! You're mixing up non-functional and functional changes here (thank you for highlighting the mistake you've previously made, it's buried rather deep!), so I'd like to ask you to split this

[clang] [libclang/python] Fix incorrect assert in test (PR #114395)

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

[clang] [libclang/python/tests] Remove Python <3.6 workarounds (PR #114399)

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

[clang] [libclang/python/tests] Remove unused variables (PR #114397)

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

[clang] Enable AST mutation in the constant evaluator (PR #115168)

2024-11-08 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/115168 >From 5ca48e03412b1b8e9253f13356b9cc957f6fd9e5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Nov 2024 17:58:43 +0300 Subject: [PATCH 1/6] Add EvalASTMutator interface with `InstantiateFunctionD

[clang] [libclang/python] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-21 Thread Vlad Serebrennikov via cfe-commits
@@ -1952,6 +1952,8 @@ def enum_value(self): underlying_type = self.type if underlying_type.kind == TypeKind.ENUM: underlying_type = underlying_type.get_declaration().enum_type +if underlying_type.kind == TypeKind.ELABORATED: -

[clang] [libclang/python] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

2024-09-23 Thread Vlad Serebrennikov via cfe-commits
@@ -1952,6 +1952,8 @@ def enum_value(self): underlying_type = self.type if underlying_type.kind == TypeKind.ENUM: underlying_type = underlying_type.get_declaration().enum_type +if underlying_type.kind == TypeKind.ELABORATED: -

[clang] [libclang/python] Fix evaluation of the unsigned enumeration values, #108766 (PR #108769)

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

[clang] [libclang/python] Improve test coverage (PR #109846)

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

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
@@ -46,6 +46,8 @@ def test_diagnostic_fixit(self): self.assertEqual(tu.diagnostics[0].location.column, 26) self.assertRegex(tu.diagnostics[0].spelling, "use of GNU old-style.*") self.assertEqual(len(tu.diagnostics[0].fixits), 1) +with self.assert

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
@@ -625,6 +762,25 @@ def test_result_type_objc_method_decl(self): self.assertEqual(cursor.kind, CursorKind.OBJC_INSTANCE_METHOD_DECL) self.assertEqual(result_type.kind, TypeKind.VOID) +def test_storage_class(self): +tu = get_tu( +""" +ex

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: I have to admit I can't assess the completeness of those tests, but they are certainly welcome. Thank you! https://github.com/llvm/llvm-project/pull/109846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [libclang/python] Improve test coverage (PR #109846)

2024-09-24 Thread Vlad Serebrennikov via cfe-commits
@@ -279,6 +280,90 @@ def test_is_default_method(self): self.assertTrue(xc.is_default_method()) self.assertFalse(yc.is_default_method()) +def test_is_deleted_method(self): +source = "class X { X() = delete; }; class Y { Y(); };" +tu = get_tu(

<    14   15   16   17   18   19   20   21   22   23   >