[clang] [clang-tools-extra] [Clang][AST][NFC] Introduce `NamespaceBaseDecl` (PR #149123)

2025-07-17 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis closed https://github.com/llvm/llvm-project/pull/149123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix contains check using llvm::find (PR #149050)

2025-07-16 Thread Yanzuo Liu via cfe-commits
@@ -575,7 +575,8 @@ bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { // The This pointer is writable in constructors and destructors, // even if isConst() returns true. - if (llvm::find(S.InitializingBlocks, Ptr.block())) + if (llvm::find(S.Initializi

[clang] [clang] Update diagnostics and documentation for type aware allocators (PR #148576)

2025-07-14 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,155 @@ += +C++ Type Aware Allocators += + +.. contents:: + :local: + +Introduction + + +Clang includes an implementation of P2719 "Type-aware allocation and deallocation +functions". + +This is a feature tha

[clang] [clang] Update diagnostics and documentation for type aware allocators (PR #148576)

2025-07-14 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/148576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Update diagnostics and documentation for type aware allocators (PR #148576)

2025-07-14 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/148576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Please update `clang/docs/LanguageExtensions.rst`. https://github.com/llvm/llvm-project/pull/148576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (PR #148195)

2025-07-12 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis closed https://github.com/llvm/llvm-project/pull/148195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (PR #148195)

2025-07-12 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Thanks for your review. https://github.com/llvm/llvm-project/pull/148195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (PR #148195)

2025-07-11 Thread Yanzuo Liu via cfe-commits
zwuis wrote: > > I'm not sure if I should update > > `llvm/include/llvm/Testing/Demangle/DemangleTestCases.inc` and > > `libcxxabi/test/DemangleTestCases.inc`. > > Why would you need to? There are no changes to mangling/demangling here AFAICT These files test demangling `RecordDecl::isInjecte

[clang] [clang-tools-extra] [lldb] [Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (PR #148195)

2025-07-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/148195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (PR #148195)

2025-07-11 Thread Yanzuo Liu via cfe-commits
zwuis wrote: I'm not sure if I should update `llvm/include/llvm/Testing/Demangle/DemangleTestCases.inc` and `libcxxabi/test/DemangleTestCases.inc`. https://github.com/llvm/llvm-project/pull/148195 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang-tools-extra] [lldb] [Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (PR #148195)

2025-07-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis created https://github.com/llvm/llvm-project/pull/148195 Co-authored-by: Matheus Izvekov >From 306049aa7dd17f6683935d631b3ad222b268a3f2 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Fri, 11 Jul 2025 18:17:05 +0800 Subject: [PATCH] (`RecordDecl` -> `CXXRecordDecl`)`:

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-07-08 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Do you need the help to merge this PR? https://github.com/llvm/llvm-project/pull/139348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Sema: suppress deprecated field warnings in implicit special-member functions Fixes: https://github.com/llvm/llvm-project/issues/147293 (PR #147400)

2025-07-08 Thread Yanzuo Liu via cfe-commits
@@ -547,6 +547,20 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, return; } case AR_Deprecated: +// Suppress -Wdeprecated-declarations in purely implicit special-member functions. +if (const FunctionDecl *FD = S.getCurFunctionDecl()) {

[clang] Sema: suppress deprecated field warnings in implicit special-member functions Fixes: https://github.com/llvm/llvm-project/issues/147293 (PR #147400)

2025-07-08 Thread Yanzuo Liu via cfe-commits
@@ -547,6 +547,20 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, return; } case AR_Deprecated: +// Suppress -Wdeprecated-declarations in purely implicit special-member functions. +if (const FunctionDecl *FD = S.getCurFunctionDecl()) {

[clang] [Clang][Sema] Do not perform error recovery for invalid member using-declaration in C++20+ mode (PR #147003)

2025-07-04 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis closed https://github.com/llvm/llvm-project/pull/147003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Do not perform error recovery for invalid member using-declaration in C++20+ mode (PR #147003)

2025-07-04 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/147003 >From 32e2c12d44da29e20212bdeed3628d4c736191ad Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Fri, 4 Jul 2025 13:58:17 +0800 Subject: [PATCH] Do not perform error recovery for invalid member using-declaration in

[clang] [clang][diagnostics] Refactor "warn_doc_api_container_decl_mismatch" to use enum_select (PR #146433)

2025-07-04 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Can we merge this with private email address? https://github.com/llvm/llvm-project/pull/146433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Do not perform error recovery for invalid member using-declaration in C++20+ mode (PR #147003)

2025-07-03 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis created https://github.com/llvm/llvm-project/pull/147003 Previously, Clang tried to perform error recovery for invalid member using-declaration whose nested-name-specifier refers to its own class in C++20+ mode, which causes crash. ```cpp template struct V {}; struct

[clang] [clang-tools-extra] [clang][CodeComplete] skip explicit obj param in SignatureHelp (PR #146649)

2025-07-02 Thread Yanzuo Liu via cfe-commits
@@ -6,9 +6,21 @@ int main() { A a {}; a. } -// RUN: %clang_cc1 -cc1 -fsyntax-only -code-completion-at=%s:%(line-2):5 -std=c++23 %s | FileCheck %s -// CHECK: COMPLETION: A : A:: -// CHECK-NEXT: COMPLETION: foo : [#void#]foo(<#int arg#>) -// CHECK-NEXT: COMPLETION: operator=

[clang] [clang-tools-extra] [clang][CodeComplete] skip explicit obj param in SignatureHelp (PR #146649)

2025-07-02 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/146649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][CodeComplete] skip explicit obj param in SignatureHelp (PR #146649)

2025-07-02 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: Thank you for the fix! https://github.com/llvm/llvm-project/pull/146649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Bytecode] Implement P1061 structured binding pack (PR #146474)

2025-07-01 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis closed https://github.com/llvm/llvm-project/pull/146474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Bytecode] Implement P1061 structured binding pack (PR #146474)

2025-07-01 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Thank you for your review. https://github.com/llvm/llvm-project/pull/146474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Bytecode] Implement P1061 structured binding pack (PR #146474)

2025-07-01 Thread Yanzuo Liu via cfe-commits
@@ -17,7 +18,7 @@ struct fake_tuple { int arr[4] = {1, 2, 3, 6}; template - int get() { + constexpr int& get() { zwuis wrote: > Were these two functions never called in a constant context before? Yes. Only semantic analysis was performed on these func

[clang] [libcxx] [clang] [modules] Implement P3618R0: Allow attaching main to the global module (PR #146461)

2025-07-01 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Please update "clang/www/cxx_status.html". https://github.com/llvm/llvm-project/pull/146461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-30 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis closed https://github.com/llvm/llvm-project/pull/143492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-30 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Thank you for your review! Failed test in CI is not related. https://github.com/llvm/llvm-project/pull/143492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-30 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/143492 >From 658f3d3cb72ff9fbdb2315f894f39956eeabf135 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Tue, 10 Jun 2025 16:41:57 +0800 Subject: [PATCH 1/5] Apply CWG400 'Using-declarations and the "struct hack"' to C++98

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

2025-06-29 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/143492 >From 658f3d3cb72ff9fbdb2315f894f39956eeabf135 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Tue, 10 Jun 2025 16:41:57 +0800 Subject: [PATCH 1/4] Apply CWG400 'Using-declarations and the "struct hack"' to C++98

[clang] [clang-tools-extra] [clang] skip explicit obj param in code complete (PR #146258)

2025-06-29 Thread Yanzuo Liu via cfe-commits
zwuis wrote: What about "ExplicitObjectMemberFunction"? It seems that this part of feature has not been tested. https://github.com/llvm/llvm-project/pull/146258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [NFC][docs][coro] Fix syntax & typos (PR #146282)

2025-06-29 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis approved this pull request. https://github.com/llvm/llvm-project/pull/146282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

2025-06-28 Thread Yanzuo Liu via cfe-commits
@@ -301,177 +735,284 @@ optimized to the equivalent of: std::cout << a+5 << "\n"; } -It should now be obvious why the value of `__int_32_0` remains unchanged -throughout the function. It is important to recognize that `__int_32_0` -does not directly correspond to `a`, bu

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

2025-06-28 Thread Yanzuo Liu via cfe-commits
@@ -301,177 +735,284 @@ optimized to the equivalent of: std::cout << a+5 << "\n"; } -It should now be obvious why the value of `__int_32_0` remains unchanged -throughout the function. It is important to recognize that `__int_32_0` -does not directly correspond to `a`, bu

[clang] [docs][coroutines] Revamp "Debugging C++ coroutines" (PR #142651)

2025-06-28 Thread Yanzuo Liu via cfe-commits
zwuis wrote: reStructuredText (`.rst`) doesn't support Markdown style link (`[text](link)`). Can you fix it? https://github.com/llvm/llvm-project/pull/142651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] Fix AST IgnoreUnlessSpelledInSource traversal nullptr dereference (PR #146103)

2025-06-27 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Thank you for the patch! Please add a release note to "clang/docs/ReleaseNotes.rst" so users can know the improvement. Please add a tag to the beginning of the PR title in square brackets like other PRs. E.g. `[clang]`. https://github.com/llvm/llvm-project/pull/146103 ___

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

2025-06-27 Thread Yanzuo Liu via cfe-commits
zwuis wrote: > > I think we need an entry in "Potentially breaking changes" section. > > This is still missing. I think [this commit](https://github.com/llvm/llvm-project/commit/c9e11f8d3d2c277fca8ec986b0c01ac71e0e4161) move the release note to the right place. Can you check this again? http

[clang] [clang-tools-extra] EndSourceFile() for preprocessor before diagnostic client (PR #145784)

2025-06-25 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/145784 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] EndSourceFile() for preprocessor before diagnostic client (PR #145784)

2025-06-25 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: Please add a tag to the beginning of the PR title in square brackets like other PRs. E.g. `[clang-tidy]`. https://github.com/llvm/llvm-project/pull/145784 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

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

2025-06-25 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/143492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][Preprocessor] Refine the implementation of isNextPPTokenOneOf (PR #145546)

2025-06-24 Thread Yanzuo Liu via cfe-commits
@@ -101,11 +101,10 @@ class Token { /// "if (Tok.is(tok::l_brace)) {...}". bool is(tok::TokenKind K) const { return Kind == K; } bool isNot(tok::TokenKind K) const { return Kind != K; } - bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { -return is(K1) || is

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-22 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,79 @@ +// RUN: %clangxx -std=c++23 -fsyntax-only -Xclang -verify %s zwuis wrote: Use `%clang_cc1` for frontend tests. `-Xclang` can be removed. https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commi

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-22 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-22 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,79 @@ +// RUN: %clangxx -std=c++23 -fsyntax-only -Xclang -verify %s + +#include +#include +#include +#include +#include +#include +#include +#include zwuis wrote: Do not include files outside test folders. You can search `namespace std` to see

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-22 Thread Yanzuo Liu via cfe-commits
@@ -57,6 +57,31 @@ enum LifetimeKind { }; using LifetimeResult = llvm::PointerIntPair; + +/// Returns true if the given entity is part of a range-based for loop and +/// should trigger lifetime extension under C++23 rules. +/// +/// This handles both explicit range loop var

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-22 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: Thank you for the patch! Please add a release note in `clang/docs/ReleaseNotes.rst` so that users can know the improvement. https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commits mailing list cfe-commits@

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Yanzuo Liu via cfe-commits
@@ -681,6 +705,30 @@ static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body, if (CD.diag_FallThrough_HasNoReturn) S.Diag(RBrace, CD.diag_FallThrough_HasNoReturn) << CD.FunKind; } else if (!ReturnsVoid && CD.diag_FallThrough_ReturnsNonVoi

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: Thank you for the patch! Please add a release note in `clang/docs/ReleaseNotes.rst`. I'm not sure if this case should be handled: ```cpp if (condition) { throw 1; } else { throw 2; } ``` Maybe we need to open an issue for it. https://github.com/llvm/llvm

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Yanzuo Liu via cfe-commits
@@ -624,8 +624,32 @@ struct CheckFallThroughDiagnostics { } }; -} // anonymous namespace +bool isKnownToAlwaysThrow(const FunctionDecl *FD) { + if (!FD->hasBody()) +return false; + const Stmt *Body = FD->getBody(); + const Stmt *OnlyStmt = nullptr; + + if (const auto

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Yanzuo Liu via cfe-commits
@@ -681,6 +705,30 @@ static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body, if (CD.diag_FallThrough_HasNoReturn) S.Diag(RBrace, CD.diag_FallThrough_HasNoReturn) << CD.FunKind; } else if (!ReturnsVoid && CD.diag_FallThrough_ReturnsNonVoi

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/145166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add function scope identifier (PR #145074)

2025-06-20 Thread Yanzuo Liu via cfe-commits
zwuis wrote: You should fork https://github.com/Ritanya-B-Bharadwaj/llvm-project and create Pull Request there. https://github.com/llvm/llvm-project/pull/145074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] Inject compilation command into __cli_ global variable (PR #144622)

2025-06-20 Thread Yanzuo Liu via cfe-commits
zwuis wrote: You should fork https://github.com/Ritanya-B-Bharadwaj/llvm-project and create Pull Request there. https://github.com/llvm/llvm-project/pull/144622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang-tools-extra] [llvm] [clang-tools-extra] Add clang-omp-pr-desc wrapper for OpenMP PR summarization (PR #144935)

2025-06-20 Thread Yanzuo Liu via cfe-commits
zwuis wrote: You should fork https://github.com/Ritanya-B-Bharadwaj/llvm-project and create Pull Request there. https://github.com/llvm/llvm-project/pull/144935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] KISHAN KUMAR S D, HRUTHIK K K , KIRAN V-R V COLLEGE OF ENGINEERING(CSE 6TH SEM)-Implement Clang identifiers to retrieve the mangled name and the fully qualified name of functions #5 (PR #14504

2025-06-20 Thread Yanzuo Liu via cfe-commits
zwuis wrote: You should fork https://github.com/Ritanya-B-Bharadwaj/llvm-project and create Pull Request there. https://github.com/llvm/llvm-project/pull/145042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [llvm] Dump auto (c++11) type Inferences (Issue #17) (PR #144478)

2025-06-20 Thread Yanzuo Liu via cfe-commits
zwuis wrote: You should fork https://github.com/Ritanya-B-Bharadwaj/llvm-project and create Pull Request there. https://github.com/llvm/llvm-project/pull/144478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] Fix crash when doing special member lookup on forward-declared classes (Fixes llvm/llvm-project#144642) (PR #144828)

2025-06-19 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Thank you for the patch! Please add tests in `clang/test/` to make sure this fix actually works. Please add a release note in `clang/docs/ReleaseNotes.rst` so that users can know the improvement. https://github.com/llvm/llvm-project/pull/144828

[clang] [BUG] Fix : #139514 (PR #144956)

2025-06-19 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Where is the fix? Only test file is modified currently. https://github.com/llvm/llvm-project/pull/144956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Dump auto (c++11) type Inferences (Issue #17) (PR #144478)

2025-06-18 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Copying a comment from #144622: > Please start a thread on https://discourse.llvm.org/ describing the problem > you're trying to solve, and your proposed solution. https://github.com/llvm/llvm-project/pull/144478 ___ cfe-commits mailing

[clang] [llvm] Dump auto (c++11) type Inferences (Issue #17) (PR #144478)

2025-06-17 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Is it necessary to have this feature? Clangd already [supports it](https://clangd.llvm.org/config.html#inlayhints). https://github.com/llvm/llvm-project/pull/144478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

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

2025-06-16 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/143492 >From 658f3d3cb72ff9fbdb2315f894f39956eeabf135 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Tue, 10 Jun 2025 16:41:57 +0800 Subject: [PATCH 1/2] Apply CWG400 'Using-declarations and the "struct hack"' to C++98

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

2025-06-16 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/143492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-16 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/143492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parser] Fix crash on invalid attribute in constexpr function (PR #144286)

2025-06-15 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Please add a release note. https://github.com/llvm/llvm-project/pull/144286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][C++][Modules] Mark P2788R0(DR) as implemented and added more test (PR #144214)

2025-06-14 Thread Yanzuo Liu via cfe-commits
@@ -905,7 +905,7 @@ C++20 implementation status https://wg21.link/P2788R0";>P2788R0 (DR) -No +Clang 17 zwuis wrote: ```suggestion Clang 17 ``` https://github.com/llvm/llvm-project/pull/144214 ___

[clang] Implement diagnostics for why `std::is_standard_layout` is false (PR #144161)

2025-06-13 Thread Yanzuo Liu via cfe-commits
@@ -2276,6 +2277,134 @@ static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static bool hasMixedAccessSpecifier(const CXXRecordDecl *D) { + AccessSpecifier FirstAccess = AS_none; + for (const Field

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

2025-06-13 Thread Yanzuo Liu via cfe-commits
zwuis wrote: I wrote wrong test case in PR description. I apologize. The following is being fixed: ```cpp struct A {}; struct B : A { using B::A; }; ``` PR description was updated. I'm away from my computer and I will add this code to test files next Monday. https://github.com/llvm/llvm-pr

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

2025-06-13 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/143492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-12 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/143492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunterminated-string-initialization] Handle C string literals ending with explicit '\0' (PR #143487)

2025-06-10 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wunterminated-string-initialization %s -x c +// RUN: %clang_cc1 -fsyntax-only -verify -Wunterminated-string-initialization %s -x c++ + + +// In C, the following examples are fine: +#if __cplusplus zwuis

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

2025-06-10 Thread Yanzuo Liu via cfe-commits
zwuis wrote: I'm not sure if I should modify CWG400 implementation status to "Clang 21". CC @Endilll https://github.com/llvm/llvm-project/pull/143492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

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

2025-06-10 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis created https://github.com/llvm/llvm-project/pull/143492 It seems that we applied CWG400 to C++11 and newer version. But CWG400 should also be applied to C++98. >From 658f3d3cb72ff9fbdb2315f894f39956eeabf135 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Tue, 10 Jun

[clang] [Clang][NFC] Add test for CWG2289 "Uniqueness of structured binding names" (PR #131054)

2025-06-09 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Ping. https://github.com/llvm/llvm-project/pull/131054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor replaceExternalDecls to use llvm::any_of (PR #143275)

2025-06-07 Thread Yanzuo Liu via cfe-commits
zwuis wrote: IIUC the `FIXME` comment means that the time complexity of this part of code is not good enough and we can make it faster. https://github.com/llvm/llvm-project/pull/143275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [Clang][Parse][NFC] Use `llvm::function_ref<>` instead of `std::optional>` (PR #142906)

2025-06-07 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Yes. I still don't have commit access. Thank you! https://github.com/llvm/llvm-project/pull/142906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Reduce some AST node size. (PR #142585)

2025-06-03 Thread Yanzuo Liu via cfe-commits
@@ -745,6 +755,16 @@ class alignas(void *) Stmt { unsigned TemplateDepth; }; + class ChooseExprBitfields { +friend class ASTStmtReader; +friend class ChooseExpr; + +LLVM_PREFERRED_TYPE(ExprBitfields) +unsigned : NumExprBits; + +bool CondIsTrue : 1; -

[clang] [Clang] add fix-it hints for unknown attributes (PR #141305)

2025-05-23 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Can you handle this case `[[using gnu : deprected]]`? https://github.com/llvm/llvm-project/pull/141305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Reject array prvalue operands (PR #140702)

2025-05-21 Thread Yanzuo Liu via cfe-commits
@@ -7639,6 +7639,8 @@ def warn_param_mismatched_alignment : Warning< def err_objc_object_assignment : Error< "cannot assign to class object (%0 invalid)">; +def err_typecheck_array_prvalue_operand : Error< + "array prvalue is not permitted">; zwuis wrote:

[clang] [Clang][Sema] Reject array prvalue operands (PR #140702)

2025-05-21 Thread Yanzuo Liu via cfe-commits
@@ -7639,6 +7639,8 @@ def warn_param_mismatched_alignment : Warning< def err_objc_object_assignment : Error< "cannot assign to class object (%0 invalid)">; +def err_typecheck_array_prvalue_operand : Error< + "array prvalue is not permitted">; zwuis wrote:

[clang] [Clang][Sema] Reject array prvalue operands (PR #140702)

2025-05-20 Thread Yanzuo Liu via cfe-commits
zwuis wrote: This is related to CWG2548. CC @Endilll https://github.com/llvm/llvm-project/pull/140702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add avoid-pragma-once. (PR #140388)

2025-05-17 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %check_clang_tidy %s portability-avoid-pragma-once %t \ +// RUN: -- -- -isystem %S/Inputs/avoid-pragma-once + +#include +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: Avoid pragma once. [portability-avoid-pragma-once] zwuis wrote: You c

[clang-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-15 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: LGTM if HighCommander4 is happy. https://github.com/llvm/llvm-project/pull/139348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix parsing of expressions of the form (T())[/*...*/] (PR #140053)

2025-05-15 Thread Yanzuo Liu via cfe-commits
@@ -710,6 +710,7 @@ Bug Fixes to C++ Support - Clang now correctly parses arbitrary order of ``[[]]``, ``__attribute__`` and ``alignas`` attributes for declarations (#GH133107) - Fixed a crash when forming an invalid function type in a dependent context. (#GH138657) (#GH115725

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-14 Thread Yanzuo Liu via cfe-commits
zwuis wrote: @cor3ntin I don't have commit access. Please help me land this. By the way, should I request commit access? https://github.com/llvm/llvm-project/pull/139560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] Revert "[Clang][Sema] Handle invalid variable template specialization whose type depends on itself (#134522)" (PR #139539)

2025-05-13 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis closed https://github.com/llvm/llvm-project/pull/139539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-13 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/139560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-13 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/139560 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-ser

[clang] [Clang][Sema] Disable checking invalid template id in initializer of primary variable template `std::format_kind` with libstdc++ (PR #139560)

2025-05-12 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis created https://github.com/llvm/llvm-project/pull/139560 Fixes #139067 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica

[clang] Revert "[Clang][Sema] Handle invalid variable template specialization whose type depends on itself (#134522)" (PR #139539)

2025-05-12 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis converted_to_draft https://github.com/llvm/llvm-project/pull/139539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Disable checking invalid template id in primary variable template initializer (PR #139490)

2025-05-12 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis closed https://github.com/llvm/llvm-project/pull/139490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][Sema] Handle invalid variable template specialization whose type depends on itself (#134522)" (PR #139539)

2025-05-12 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis created https://github.com/llvm/llvm-project/pull/139539 #134522 triggers compilation error with libstdc++. See #139067 or . This reverts commit 91f1830cb69cab96201adba6378d64095e251f95. >From 4878337bb6b2d6152fc531

[clang] Fix missing initializer for inline static template member with auto caused by delayed template instantiation. (PR #138122)

2025-05-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: LGTM https://github.com/llvm/llvm-project/pull/138122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/139348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/139348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,296 @@ +//===--- OverridePureVirtuals.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,296 @@ +//===--- OverridePureVirtuals.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,296 @@ +//===--- OverridePureVirtuals.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [clangd] Add tweak to add pure virtual overrides (PR #139348)

2025-05-11 Thread Yanzuo Liu via cfe-commits
@@ -0,0 +1,296 @@ +//===--- OverridePureVirtuals.cpp *- C++-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Clang][Sema] Disable checking invalid template id in primary variable template initializer (PR #139490)

2025-05-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis created https://github.com/llvm/llvm-project/pull/139490 Workaround for #139067 >From c5a9cda3e5c3aa2b07281e373e9736045a01643b Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Mon, 12 May 2025 11:08:50 +0800 Subject: [PATCH] Disable checking invalid template id in prima

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-05-11 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: LGTM https://github.com/llvm/llvm-project/pull/130458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   >