[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Ah, I see where the limitation comes from. According to [Wikipedia](https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit), there is bright blue color which many terminals display differently from regular blue. While this means we're expanding 3-bit color palette to

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: It looks a tinybit better in my local terminal, but still significantly harder to read than the rest of the text: ![image](https://github.com/llvm/llvm-project/assets/12883766/5b0136a5-012b-47f5-b888-787d1c060d54) But it's a bit off the point. We should pick colors that have

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-30 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: The deep shade of blue doesn't make sense for both light and dark backgrounds: ![image](https://github.com/llvm/llvm-project/assets/12883766/e9ee6658-1ab1-422f-914b-5f95cac3846d) ![image](https://github.com/llvm/llvm-project/assets/12883766/986ae6f4-2fa9-4d2a-b661-47de3bf92cde)

[clang] [NFC][IdentifierInfo] Use llvm::Bitfield for the bitfield (PR #79366)

2024-01-26 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > It shouldn't be necessary to analyze uint64_t Storage directly through a > debugger. It's handled via the Bitfield getters and setters. Is that not > sufficient for debugging purposes? Unfortunately, it's not. Not every debugger can run getters while displaying the value

[clang-tools-extra] [clang] [compiler-rt] [llvm] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-25 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -verify -std=c++98 %s +// RUN: %clang_cc1 -verify -std=c++11 %s +// RUN: %clang_cc1 -verify -std=c++14 %s +// RUN: %clang_cc1 -verify -std=c++17 %s +// RUN: %clang_cc1 -verify -std=c++20 %s +// RUN: %clang_cc1 -verify -std=c++23 %s +// RUN:

[clang] [clang-tools-extra] [compiler-rt] [llvm] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78898 >From b99a75a8756a7841657fc78ffbd40f780a412f2b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 21 Jan 2024 16:26:29 +0300 Subject: [PATCH 1/2] [clang][Sema] Add checks for validity of default ctor's

[clang-tools-extra] [llvm] [clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78898 >From b99a75a8756a7841657fc78ffbd40f780a412f2b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 21 Jan 2024 16:26:29 +0300 Subject: [PATCH 1/2] [clang][Sema] Add checks for validity of default ctor's

[clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-25 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78898 >From b99a75a8756a7841657fc78ffbd40f780a412f2b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 21 Jan 2024 16:26:29 +0300 Subject: [PATCH 1/2] [clang][Sema] Add checks for validity of default ctor's

[clang] [clang-tools-extra] [llvm] [clang] Add test for CWG472 (PR #67948)

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

[clang] [NFC][IdentifierInfo] Use llvm::Bitfield for the bitfield (PR #79366)

2024-01-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I find `llvm::Bitfield` API with all its explicit setters with explicit storage parameter clunky compared to language bit-fields. But that's minor. My major issue with this patch is that `uint64_t Storage;` is as opaque for debuggers as it gets. It would take so much work to

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @linux4life798 Can you review the last update? https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @linux4life798 Do you mind filing issues for the points you highlighted? Feel free to skip this step if you (or someone else) plan to submit PRs that address them. https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits

[clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: So my takeaways here are: 1. Tests that ensure we don't crash anymore are important for us. 2. `-verify` is an acceptable way to write such tests. Is this correct? https://github.com/llvm/llvm-project/pull/78898 ___ cfe-commits mailing

[clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > why can't we add -verify test? Yes, it will be checking errors that the patch > didn't touch, but it is what mostly people do when adding clang tests and it > will be +N test cases in a regular test base which not only ensure your > change is correct, but the future ones too.

[clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > So, there is no way to consistently check on all platforms that we didn't > crash when an error diagnostic was issued (does clang return non-zero when > there is error diagnostic?), is that a right understanding? Yes. On Linux and Windows `1` is returned if error diagnostic

[clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Could you elaborate a bit more on that? What is the exact problem with the > testing infrastructure? Can we just add a separate test with the cases from > the issues, perhaps without -verify at all? 1) I think that the most reliable way to detect a crash would be to leverage

[clang] [clang] Update documentation for `#pragma diagnostic` (PR #78095)

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

[clang] [clang] Update documentation for `#pragma diagnostic` (PR #78095)

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

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-22 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @linux4life798 Nice catch! I see that so far only `CompilationDatabase` and `CompletionChunk` expose functions in camelCase. It would be nice to change them, too, but those are decade-old APIs that _I think_ we promise stability for, so it might not be possible.

[clang-tools-extra] [llvm] [flang] [mlir] [clang] [compiler-rt] [libc] [libcxx] [clang] Remove `CXXNewInitializationStyle::Implicit` (PR #78793)

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

[flang] [clang] [libc] [llvm] [compiler-rt] [clang-tools-extra] [libcxx] [mlir] [clang] Remove `CXXNewInitializationStyle::Implicit` (PR #78793)

2024-01-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78793 >From f6a599d6e662121f19529f59ffa44cc6177c0835 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 20 Jan 2024 00:58:06 +0300 Subject: [PATCH] [clang] Remove `CXXNewInitializationStyle::Implicit` This

[clang] [clang-tools-extra] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

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

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM PR description is going to become a commit message after merging. Let me know when it's ready. https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list

[clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I decided to not include tests, because our testing infrastructure is not ready to test that Clang doesn't crash without overspecifying the tests using `-verify` mode. https://github.com/llvm/llvm-project/pull/78898 ___ cfe-commits

[clang] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-01-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78898 Fixes #10518 Fixes #67914 Fixes #78388 Also addresses the second example in #49103 This patch is based on suggestion from @cor3ntin in https://github.com/llvm/llvm-project/issues/67914#issuecomment-1896011898

[llvm] [libc] [compiler-rt] [clang] [libcxx] [clang-tools-extra] [flang] [clang] Remove `CXXNewInitializationStyle::Implicit` (PR #78793)

2024-01-21 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78793 >From f6a599d6e662121f19529f59ffa44cc6177c0835 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 20 Jan 2024 00:58:06 +0300 Subject: [PATCH] [clang] Remove `CXXNewInitializationStyle::Implicit` This

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

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

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I have reviewed the tests for libclang and it appears that there are already > tests for the rewriter, which are more extensive than the ones I wrote. > Therefore, I have decided to mirror the tests from libclang in the Python > binding. Please let me know if this approach is

[clang] [clang] Stop reporting unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-01-20 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @cor3ntin During our offline discussion with @AaronBallman, points "we don't want to read tea leaves" and "CWG can change their opinion" were repeated so often, that I thought we have consensus on using only official source on information, i.e. issue list. I also don't see why

[clang] [clang] Stop reporting unresolved issues in `cxx_dr_status.html` (PR #78836)

2024-01-20 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78836 This patch prevents tests for unresolved issues to report availability (e.g. `no` or `18`) on `cxx_dr_status.html` page. But it still checks whether specified status matches status on the official list,

[clang] [llvm] [clang-tools-extra] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

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

[clang] [clang-tools-extra] [clang] Remove `CXXNewInitializationStyle::Implicit` (PR #78793)

2024-01-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78793 This is a follow up to https://github.com/llvm/llvm-project/pull/71417 , which aims to resolve concerns brought up there. Namely, this patch replaces `CXXNewInitializationStyle::Implicit` with a dedicated

[clang] [Clang][Sema] Allow elaborated-type-specifiers that declare member class template explict specializations (PR #78720)

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

[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)

2024-01-19 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @frederick-vs-ja PR description is going to be used as a commit message. You can edit it. Let me know when it's ready. https://github.com/llvm/llvm-project/pull/68846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [flang] [clang] [llvm] [compiler-rt] [clang] Add test for CWG1807 (PR #77637)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @mysterymath It's a bit of a shame to admit that I missed the first half of RUN lines in the previous follow-up. Should be fixed now by a7588bb9bab43420f1c2642c80489f74af88f855 https://github.com/llvm/llvm-project/pull/77637 ___

[clang] a7588bb - [clang] Pass `-n` to llvm-cxxfilt in even more codegen tests

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-01-18T22:22:38+03:00 New Revision: a7588bb9bab43420f1c2642c80489f74af88f855 URL: https://github.com/llvm/llvm-project/commit/a7588bb9bab43420f1c2642c80489f74af88f855 DIFF:

[clang-tools-extra] [flang] [clang] [compiler-rt] [llvm] [clang] Add test for CWG1807 (PR #77637)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @nico I tried to address this in 30da0f5a359ab4a684c5fdf0f4dbed20bae10f99 https://github.com/llvm/llvm-project/pull/77637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 30da0f5 - [clang] Pass `-n` to llvm-cxxfilt in codegen tests

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-01-18T20:25:18+03:00 New Revision: 30da0f5a359ab4a684c5fdf0f4dbed20bae10f99 URL: https://github.com/llvm/llvm-project/commit/30da0f5a359ab4a684c5fdf0f4dbed20bae10f99 DIFF:

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

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

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
@@ -182,8 +182,8 @@ struct Bad2 { int a, b; }; } // namespace dr2386 namespace std { template struct tuple_size; -template <> struct std::tuple_size {}; Endilll wrote: Is this warning emitted if we spell it `::std::tuple)size`?

[clang] [Clang][Sema] Diagnose use of template keyword after declarative nested-name-specifiers (PR #78595)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
@@ -182,8 +182,8 @@ struct Bad2 { int a, b; }; } // namespace dr2386 namespace std { template struct tuple_size; -template <> struct std::tuple_size {}; Endilll wrote: Is this a really necessary change? https://github.com/llvm/llvm-project/pull/78595

[clang-tools-extra] [llvm] [clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/6] [clang] Implement CWG1878 "`operator auto` template"

[clang-tools-extra] [llvm] [clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/5] [clang] Implement CWG1878 "`operator auto` template"

[flang] [clang] [compiler-rt] [clang-tools-extra] [llvm] [clang] Add test for CWG1807 (PR #77637)

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

[clang-tools-extra] [clang] [llvm] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/4] [clang] Implement CWG1878 "`operator auto` template"

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
@@ -11322,9 +11322,22 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
@@ -686,3 +686,19 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in function prototype}} } } + +struct DeducedTargetTypeOfConversionFunction { + operator auto() const { return char(); } + operator const auto() const { return float(); } Endilll

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/4] [clang] Implement CWG1878 "`operator auto` template"

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > The enum we had in the past described the syntax of the new expression. Even if it was the case at some point, I'm not sure it held when I created the PR, which eliminated this kind of nasty mapping, encoding how this enum was actually used: ```cpp

[clang] [llvm] [clang-tools-extra] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

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

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I agree this stretches the definition of NFC commit. But it was dully reviewed and approved https://github.com/llvm/llvm-project/pull/71322 I agree with this assessment. I think it really started as regular NFC, but then me and Aaron realized that we can get rid of some ugly

[clang] [clang-tools-extra] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

2024-01-18 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > I'd qualify this as a regression, by looking at that the commit was supposed > to be an NFC. Could you please confirm @Endilll? I'll leave to @AaronBallman to decide whether this is a functional change, but I can confirm that patch is working as intended, because there is an

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

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

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

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

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
@@ -11792,6 +11792,32 @@ static bool CheckMultiVersionFunction(Sema , FunctionDecl *NewFD, OldDecl, Previous); } +static void CheckFunctionDeclarationAttributesUsage(Sema , +

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Looks good overall. It's good that you wrote your own tests, but it would also be nice to mirror tests in `clang/unittests/libclang/LibclangTest.cpp` which test the same API. This way we can identify issues in binding layer itself (when C++ tests pass,

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I documented that we don't support unpaired `pop` (tracked in #23065) and enabling diagnostics that are not enabled via CLI (tracked in #78418). https://github.com/llvm/llvm-project/pull/78095 ___ cfe-commits mailing list

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-17 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78095 >From 1aca1cd3be8209675b8aa3b79b2d626ad9f3c559 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 14:11:16 +0300 Subject: [PATCH 1/3] [clang] Remove outdated parts of documentation for

[clang] [llvm] [GitHub] Add python 3.7 to libclang python test (PR #77219)

2024-01-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. LGTM. I believe we can go ahead with this even if discussion about raising minimum Python version is not going anywhere. Better test 3.7 and 3.11 than just 3.11 anyway. https://github.com/llvm/llvm-project/pull/77219

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-01-16 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Yeah, I remember I was able to get past the first round of test failures, only to find another one waiting for me. Once again I need to sit and debug AST serizalization and deserialization, but I've been occupied with other stuff since then. I'm not giving up on this just yet,

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-15 Thread Vlad Serebrennikov via cfe-commits
@@ -1157,19 +1156,16 @@ existed. #if foo #endif foo // warning: extra tokens at end of #endif directive - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wextra-tokens" + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wextra-tokens"

[lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-15 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > The logic is that this is a pretty big hole in our C++20 support and I don't > think it's reasonable to try a merge after the deadline for 18. WDYT? >From our past experience with release managers, they seem quite generous with >deadlines to merge stuff in, as long as

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: LGTM, but wair for other reviewers. https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
@@ -11322,9 +11322,22 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/2] [clang] Implement CWG1878 "`operator auto` template"

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78103 C++14 introduced deduced return type for regular functions, but shortly after [CWG1878](https://wg21.link/cwg1878) was filed and resolved to disallow deduced return types in conversion function templates. So

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78095 GCC has changed over the past decade. Fixes #51472 >From 1aca1cd3be8209675b8aa3b79b2d626ad9f3c559 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 14:11:16 +0300 Subject: [PATCH] [clang]

[compiler-rt] [lld] [clang] [libc] [libclc] [lldb] [llvm] [clang-tools-extra] [flang] [libcxx] [libunwind] [clang] Add tests for DRs about complete-class context (PR #77444)

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

[compiler-rt] [lld] [clang] [libc] [libclc] [lldb] [llvm] [clang-tools-extra] [flang] [libcxx] [libunwind] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: CI fails on formatting in unrelated files, so I'm going to ignore it: ``` t=1704988008448 + echo '*** Checking for trailing whitespace left in Clang source files ***' t=1704988008448 *** Checking for trailing whitespace left in Clang source files *** t=1704988008448 + grep -rnI

[clang] [clang] Add test for CWG1350 (PR #78040)

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

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

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

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Looking at other places, it looks like init-list stuff is guarded behind > getLangOpts().CPlusPlus11, so I'll add that check. Corentin told me offline that check for list initialization that you do might be sufficient, as it can't pass in 98. > It looks like this DR is CD5

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Initializer list syntax isn't available in C++98 mode (even as an extension? > I can't find the option) I'm not confident enough to properly review your changes, but my line of thinking is the following: `void()` is available in all language modes, but you're adding

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: DR testing part looks fine. I'm worried there are no regular tests. It's also not clear what happens in 98 mode. New code doesn't seem to care about language mode. https://github.com/llvm/llvm-project/pull/78060

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
@@ -25,7 +25,7 @@ template struct S {}; // #dr1801-S S V; // #dr1801-S-i // cxx98-14-error@-1 {{non-type template argument does not refer to any declaration}} // cxx98-14-note@#dr1801-S {{template parameter is declared here}} -// since-cxx17-error@#dr1801-S-i {{non-type

[clang-tools-extra] [clang] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: C++ DR test changes look good to me. https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

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

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78040 >From 62620337b64c64535d76c5003f9acd450ab527f7 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 13 Jan 2024 17:32:37 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG1350 Test is based on

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Looks perfect to me now. Thank you! https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I was way too deep into P0136R1 [Rewording inheriting constructors (core issue 1941 et al)](https://wg21.link/p0136r1) when I realized Richard has written tests for all issues covered there long ago. So I decided to carry on and check whether those tests would benefit from

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78040 Test is based on [P0136R1](https://wg21.link/p0136r1) wording instead of proposed resolution in the issue itself. This patch also expands related CWG1573 test with an additional test case. Existing `3.9`

[llvm] [clang-tools-extra] [clang] [clang] Add test for CWG472 (PR #67948)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
@@ -2871,7 +2871,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/472.html;>472 drafting Casting across protected inheritance -Not resolved +No Endilll wrote: Current state of things is my fault (I was

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

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

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
@@ -132,6 +142,36 @@ namespace dr2126 { // dr2126: 12 #endif } +namespace dr2137 { // dr2137: 18 +#if __cplusplus >= 201103L + struct Q { +Q(); +Q(Q&&); +Q(std::initializer_list) = delete; // since-cxx11-note 2 {{has been explicitly marked deleted here}} + }; +

[clang] [clang-tools-extra] [compiler-rt] [flang] [llvm] [clang] Add test for CWG1807 (PR #77637)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77637 >From 545ee4900e48b186e1c9fff93dc62a459ee19754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 10 Jan 2024 20:27:53 +0300 Subject: [PATCH 1/7] [clang] Add test for CWG1807 The test checks that

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Following the suggestion from @nikic, I prepared two variants of the same test, one hard-written, and one using `update_cc_test_checks.py` (with heavy manual editing afterwards). Hand-written: ``` // CHECK-LABEL: define dso_local void @dr1807::f() // CHECK:

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77637 >From 545ee4900e48b186e1c9fff93dc62a459ee19754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 10 Jan 2024 20:27:53 +0300 Subject: [PATCH 1/7] [clang] Add test for CWG1807 The test checks that

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77637 >From 545ee4900e48b186e1c9fff93dc62a459ee19754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 10 Jan 2024 20:27:53 +0300 Subject: [PATCH 1/6] [clang] Add test for CWG1807 The test checks that

[clang] [clang] Add test for CWG1807 (PR #77637)

2024-01-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77637 >From 545ee4900e48b186e1c9fff93dc62a459ee19754 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 10 Jan 2024 20:27:53 +0300 Subject: [PATCH 1/5] [clang] Add test for CWG1807 The test checks that

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I cleaned up the reviewers. I suggest to use `git merge` next time you need to bring your PR up to date with `main`. We are not worried about merge commits, as squash is the only available merge option for PRs. I also suggest to use "Start review" button when you respond to

[llvm] [clang] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -triple x86_64-linux -std=c++11 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s -//

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -triple x86_64-linux -std=c++11 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s -//

[llvm] [libclc] [lldb] [libcxx] [flang] [libc] [libunwind] [lld] [clang] [clang-tools-extra] [compiler-rt] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -42,6 +42,28 @@ namespace dr1611 { // dr1611: dup 1658 C c; } +namespace dr1626 { // dr1626: no open +// FIXME: current consensus for CWG2335 is that the examples are well-formed. Endilll wrote: We had an offline discussion, and concluded that this test

[clang] [compiler-rt] [libc] [libunwind] [clang-tools-extra] [libclc] [lldb] [libcxx] [llvm] [flang] [lld] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77444 >From 1cbf8eec15112cd6871fcfb69425c62f08c8f681 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 9 Jan 2024 14:17:21 +0300 Subject: [PATCH 1/4] [clang] Add tests for DRs about complete-class context

[flang] [lldb] [lld] [clang] [llvm] [clang-tools-extra] [libclc] [libunwind] [libcxx] [libc] [compiler-rt] [clang] Add tests for DRs about complete-class context (PR #77444)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/77444 >From 1cbf8eec15112cd6871fcfb69425c62f08c8f681 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 9 Jan 2024 14:17:21 +0300 Subject: [PATCH 1/4] [clang] Add tests for DRs about complete-class context

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

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

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -132,6 +142,36 @@ namespace dr2126 { // dr2126: 12 #endif } +namespace dr2137 { // dr2137: 18 +#if __cplusplus >= 201103L + struct Q { +Q(); +Q(Q&&); +Q(std::initializer_list) = delete; // expected-note 2 {{has been explicitly marked deleted here}} + }; + +

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -349,8 +349,8 @@ namespace dr1684 { // dr1684: 3.6 }; constexpr int f(NonLiteral &) { return 0; } constexpr int f(NonLiteral) { return 0; } - // since-cxx11-error@-1 {{constexpr function's 1st parameter type 'NonLiteral' is not a literal type}} - //

<    3   4   5   6   7   8   9   10   11   12   >