[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-11 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From 32bcc78c7d563bda920b3b6150dc1149e1ca1df1 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that r

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-11 Thread Qizhi Hu via cfe-commits
@@ -4342,10 +4342,17 @@ QualType Sema::CheckTemplateIdType(TemplateName Name, InstantiatingTemplate Inst(*this, TemplateLoc, Template); if (Inst.isInvalid()) return QualType(); +if (!AliasTemplate->getDeclContext()->isFileContext()) { + ContextRAII SavedC

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-11 Thread Qizhi Hu via cfe-commits
@@ -409,7 +413,7 @@ RISC-V Support CUDA/HIP Language Changes ^ -- PTX is no longer included by default when compiling for CUDA. Using +- PTX is no longer included by default when compiling for CUDA. Using jcsxky wrote: Fixed. https:/

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-11 Thread Qizhi Hu via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -std=c++11 -verify %s +// RUN: %clang_cc1 -std=c++14 -verify %s +// RUN: %clang_cc1 -std=c++17 -verify %s +// RUN: %clang_cc1 -std=c++20 -verify %s jcsxky wrote: Fixed. https://github.com/llvm/llvm-project/pull/83847

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-11 Thread Qizhi Hu via cfe-commits
@@ -259,6 +259,10 @@ Bug Fixes in This Version operator. Fixes (#GH83267). +- Allow access to a public template alias declaration that refers to friend's jcsxky wrote: Updated and put it to the right place. https://github.com/llvm/llvm-project/pull/83847

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/84671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/84671 >From 52093e782c55fb5492070e8dc8686c06922b0997 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Mar 2024 16:11:18 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on type constraint checking --- clang/docs/Rel

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > The commit message and release note needs to be MUCH more detailed. Else I > think this looks like an acceptable patch. Thanks for you remind! I have updated commit message and release note to make it more clear. https://github.com/llvm/llvm-project/pull/84671

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/84671 >From 1b71ce0ece77060591edaf69794e184d58ad9b15 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Mar 2024 16:11:18 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on type constraint checking --- clang/docs/Rel

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 9e7ba80350e56f5dab87f7fc247744d8cd129c9e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform --- clang/docs/ReleaseN

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From fbf5cca3ecdbcc0a440c42a1f0f52552a0f8ece6 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align c

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/78400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Improve import of variable template specializations. (PR #78284)

2024-01-26 Thread Qizhi Hu via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: jcsxky wrote: I have tested the code locally and testcase from this [issue](https://github.com/llvm/llvm-project/issues/75114) and all works fine. So, I approve this patch. https://github.com/llvm/llvm-project/pull/78284 _

[clang] [clang][ASTImporter] Improve import of variable template specializations. (PR #78284)

2024-01-26 Thread Qizhi Hu via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/jcsxky approved this pull request. https://github.com/llvm/llvm-project/pull/78284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Clang][Sema] fix deducing auto& from const int in template parameters is impossible in partial specializations (PR #79733)

2024-01-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/79733 Fix [issue](https://github.com/llvm/llvm-project/issues/77189) AutoType is possible cv qualified. >From 35662b8929952af13eb31bc127144df2d7c1d003 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 28 Jan 2024 15:12

[clang] [Clang][Sema] fix deducing auto& from const int in template parameters is impossible in partial specializations (PR #79733)

2024-01-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/79733 >From 9834d065580a668f94f74adaf8507ca672e9118f Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 28 Jan 2024 15:12:01 +0800 Subject: [PATCH] [Clang][Sema] fix deducing auto& from const int in template parameters

[clang] [clang-tools-extra] [Clang][Sema] fix deducing auto& from const int in template parameters is impossible in partial specializations (PR #79733)

2024-01-28 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Oh wow, thanks for this fix! It will need a Changelog entry. > > Does it fixes any of these issues? #68885 This patch can't fix #68885. I have looked into the code and the root cause maybe different (probably relate to ExprConst, I'm not sure). Need more work on that issue. h

[clang] [Clang][Sema] fix deducing auto& from const int in template parameters is impossible in partial specializations (PR #79733)

2024-01-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/79733 >From af0b28a28f0bf46b22521c0b39d5200eb94838dd Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 28 Jan 2024 15:12:01 +0800 Subject: [PATCH] [Clang][Sema] fix deducing auto& from const int in template parameters

[clang] [Clang][Sema] fix deducing auto& from const int in template parameters is impossible in partial specializations (PR #79733)

2024-01-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/79733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-31 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > @jcsxky this patch introduced a regression. Please see the reproducer here: > https://godbolt.org/z/rEfWP75Ta. It compiles before this change and fails at > this change. It also compiles with gcc and clang-17. Sorry for importing new bugs. @erichkeane Could you help me revert t

[clang] Revert "[Clang][Sema] fix outline member function template with defau… (PR #80144)

2024-01-31 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky approved this pull request. https://github.com/llvm/llvm-project/pull/80144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][Sema] fix outline member function template with defau… (PR #80144)

2024-01-31 Thread Qizhi Hu via cfe-commits
jcsxky wrote: Thank for your help! https://github.com/llvm/llvm-project/pull/80144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/80288 Try to fix [issue](https://github.com/llvm/llvm-project/issues/68490 ) and some extented problem. Root cause of current issue is that error handling in instantiation of function parameter with default initializat

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
jcsxky wrote: details: ```cpp template constexpr int FuncAlign(int param = alignof(FunctionTemplateParam)); template <> template constexpr int Problem::FuncAlign(int param) { // depth of FunctionTemplateParam in default // initialization of alignof(Func

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80288 >From 3d7adb18e15668216f39b2ba757b7b52bca99812 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 1 Feb 2024 20:54:46 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align cr

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80288 >From 88c382b0af1ebc76e5d80d36ddb5345e0bc9f676 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 1 Feb 2024 20:54:46 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align cr

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80288 >From 329e78b18bf83fe984cc1ff8830f5a8be8cf3f7b Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 1 Feb 2024 20:54:46 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align cr

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-03 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80288 >From cfcffbfa15959963b2b91078ec1911504811d3c1 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 1 Feb 2024 20:54:46 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align cr

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-03 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/80288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/80802 Try to fix [issue](https://github.com/llvm/llvm-project/issues/76674) When transform a lambda expression which is declared in an unevaluated context, `isInstantiationDependentType()` and `isVariablyModifiedType()`

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 6dbd0937e8ded4dd8f71afb876bb3930c309 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression decla

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-05 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 741793c9584753e6e888c9824961501b676b1143 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression decla

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-06 Thread Qizhi Hu via cfe-commits
@@ -1613,8 +1613,8 @@ namespace { bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + if (T->isInstantiationDependentType() || T->isVariablyModifiedType() ||

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-06 Thread Qizhi Hu via cfe-commits
@@ -1613,8 +1613,8 @@ namespace { bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + if (T->isInstantiationDependentType() || T->isVariablyModifiedType() ||

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-06 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 9dbc077e263bc16ab3919b6691ee8c4585377caf Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression decla

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-06 Thread Qizhi Hu via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -verify -std=c++20 -emit-llvm -o - %s jcsxky wrote: removed `-verify` https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 2b55af4e11a637e268e498242041cb0fe482e375 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression decla

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 1706840eccdabcd3d5cc8bd7a80c9db96d6230c3 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression decla

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 376d5b0f6986f7cdf7bddd29fdbd418ba632da7a Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression decla

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From c3856543fd56ec33bab6bcdcd3d833c0e19f58f9 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] fix --- clang/lib/Sema/SemaTemplateInstantiate.cpp | 12 ++--

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 1a1ae44bc9b937f8a79afa3b40c7ad32e1fde8dd Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] fix --- clang/lib/Sema/SemaTemplateInstantiate.cpp | 12 ++--

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From e8a5715a6255bc110823dbe36734bb7bd17753d5 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align c

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/78400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 9bb08560d401018cc63dc3b3e635c4f95cad7819 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align c

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 07b6d2105b84ba045bc8093ac0541d2db6e29cd5 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align c

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 774f1abbe16cd642b0838105f68e5c5d02e37aef Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align c

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-20 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align c

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/78896 Try to fix [issue](https://github.com/llvm/llvm-project/issues/78542) by creating a new `FunctionTypeDepthState` and pop it after finish. >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001 Fr

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78896 >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH 1/2] [Clang][Sema] fix outline member function template with default ali

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-21 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 5da8d470b84cc175a3be9c00314b01a1c9f78837 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform --- clang/docs/ReleaseN

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-21 Thread Qizhi Hu via cfe-commits
@@ -6124,7 +6124,11 @@ QualType TreeTransform::TransformFunctionProtoType( // "pointer to cv-qualifier-seq X" between the optional cv-qualifer-seq // and the end of the function-definition, member-declarator, or // declarator. - Sema::CXXThisScopeR

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-21 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 0e74e6cc4d33e4edcf7400525d1134cb7318eabc Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform --- clang/docs/ReleaseN

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78896 >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH 1/2] [Clang][Sema] fix outline member function template with default ali

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-22 Thread Qizhi Hu via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s jcsxky wrote: Sorry, I am afraid that I misunderstand root cause of this issue and still need more working on it. https://github.com/llvm/llvm-project/pull/78896 ___

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky converted_to_draft https://github.com/llvm/llvm-project/pull/79084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky ready_for_review https://github.com/llvm/llvm-project/pull/79084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/79084 >From 0b127ff20bc9a6a1d4de7bcbfa2c5ad466cea14c Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 23 Jan 2024 10:09:44 +0800 Subject: [PATCH] [clang][ASTImporter] fix assert fail due to offset overflow --- clang/

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/79084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From b9de8c52a2ffbd03c8a5368f6e62ba6c68ce2125 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align c

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 852e2d26ee3433e09978da93dfe6303faac92876 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align c

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-22 Thread Qizhi Hu via cfe-commits
@@ -3063,11 +3064,18 @@ bool Sema::SubstDefaultArgument( /*ForDefinition*/ false); if (addInstantiatedParametersToScope(FD, PatternFD, *LIS, TemplateArgs)) return true; + if (FD->isOutOfLine()) { +auto *CurrentTemplateArgumentList = Template

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-23 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 71660611976c4f21f71ebfe509fc021b1e3586e2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align c

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-23 Thread Qizhi Hu via cfe-commits
@@ -859,6 +859,9 @@ Bug Fixes in This Version Fixes (`#78290 `_) - Fixed assertion failure with deleted overloaded unary operators. Fixes (`#78314 `_) +- Fix crash when spe

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-25 Thread Qizhi Hu via cfe-commits
jcsxky wrote: @cor3ntin I test this code ```cpp inline auto XXXYYY = [](auto a) { return [=]() { return 1; }; }; void foo(){ XXXYYY(1); } ``` after name mangling, clang outputs: ```cpp call void @_ZNK6XXXYYYMUlT_E_clIiEEDaS0_(ptr noundef nonnull align 1

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 2d6a39f5d679d2a29f606a49f07c596855f2d9d0 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform --- clang/docs/ReleaseN

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-25 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > There seems to be an issue with the rebasing of the PR. As we branch clang > 18, the new changelog (for 19) being empty is expected I try to merge this PR and found `ReleaseNotes.rst` is changed because of clang-19 initialize. I don't know where should I add the release note.

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 707c471617b91b12914a10e3763e8d78aab9c112 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform --- clang/docs/ReleaseN

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-13 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/78088 Try to fix [issue](https://github.com/llvm/llvm-project/issues/73619) 1. During transforming `FunctionProtoType`, if `ThisContext,` is `nullptr` and `CurrentContext` is `ClassTemplateSpecializationDecl`, Construc

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From d040754092faa2106dc0b63af5e8bc7d7e1e47c2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform --- clang/include/clang

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] improve sema check of clang::musttail attribute (PR #77727)

2024-01-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/77727 >From 537228ee1a223cd89e87daa4402d3aa183d38980 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 11 Jan 2024 13:02:21 +0800 Subject: [PATCH] [Clang][SemaCXX] improve sema check of clang::musttail attribute ---

[clang] [Clang][Sema] improve sema check of clang::musttail attribute (PR #77727)

2024-01-14 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Just needs a release note, else LGTM. Release note has been added. https://github.com/llvm/llvm-project/pull/77727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-16 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From d040754092faa2106dc0b63af5e8bc7d7e1e47c2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH 1/2] [Clang][Sema] fix crash of attribute transform --- clang/include/c

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-16 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From d040754092faa2106dc0b63af5e8bc7d7e1e47c2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH 1/3] [Clang][Sema] fix crash of attribute transform --- clang/include/c

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-16 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 55b433e5bad38b2ce359c480066b1b8c2917ebbf Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform --- clang/include/clang

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-16 Thread Qizhi Hu via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 %s -verify -fsyntax-only + +// expected-no-diagnostics + +template +struct Bar { +int* data; + +auto operator[](const int index) const [[clang::lifetimebound]] -> decltype(data[index]) { +return data[index]; +} +}; + +int m

[clang] [Clang][Sema] improve sema check of clang::musttail attribute (PR #77727)

2024-01-16 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/77727 >From 67396b51f45f36391bbcf47d1d4cae9274d18526 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 11 Jan 2024 13:02:21 +0800 Subject: [PATCH] [Clang][SemaCXX] improve sema check of clang::musttail attribute ---

[clang] [Clang][Sema] improve sema check of clang::musttail attribute (PR #77727)

2024-01-17 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/77727 >From 17e2f6d329a457cef4580b8f8415d10150b648ec Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 11 Jan 2024 13:02:21 +0800 Subject: [PATCH] [Clang][SemaCXX] improve sema check of clang::musttail attribute ---

[clang] [Clang][Sema] improve sema check of clang::musttail attribute (PR #77727)

2024-01-17 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/77727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-18 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 7632f631ec949f91d2ecec2b6f16951f9288920f Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform --- clang/include/clang

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-18 Thread Qizhi Hu via cfe-commits
@@ -7081,10 +7085,10 @@ QualType TreeTransform::TransformAttributedType( // FIXME: dependent operand expressions? if (getDerived().AlwaysRebuild() || modifiedType != oldType->getModifiedType()) { -// TODO: this is really lame; we should really be rebuilding the -

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-18 Thread Qizhi Hu via cfe-commits
@@ -7081,10 +7085,10 @@ QualType TreeTransform::TransformAttributedType( // FIXME: dependent operand expressions? if (getDerived().AlwaysRebuild() || modifiedType != oldType->getModifiedType()) { -// TODO: this is really lame; we should really be rebuilding the -

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-18 Thread Qizhi Hu via cfe-commits
@@ -7081,10 +7085,10 @@ QualType TreeTransform::TransformAttributedType( // FIXME: dependent operand expressions? if (getDerived().AlwaysRebuild() || modifiedType != oldType->getModifiedType()) { -// TODO: this is really lame; we should really be rebuilding the -

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-18 Thread Qizhi Hu via cfe-commits
@@ -7081,10 +7085,10 @@ QualType TreeTransform::TransformAttributedType( // FIXME: dependent operand expressions? if (getDerived().AlwaysRebuild() || modifiedType != oldType->getModifiedType()) { -// TODO: this is really lame; we should really be rebuilding the -

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-18 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From b0fcd3b278cf625845c192301e0d9c37af09c239 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform --- clang/include/clang

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 08382e9f909bace4dbaf1f0c5d62d4e17978e3aa Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] fix --- clang/lib/Sema/SemaTemplateInstantiate.cpp | 10 +- 1

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 4c1f1d6427f27f7ed3cee8b49ee43a96025f2f0e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] fix --- clang/lib/Sema/SemaTemplateInstantiate.cpp | 10 +++--- 1

[clang] [Clang][Sema] fix a bug on template partial specialization (PR #89862)

2024-04-25 Thread Qizhi Hu via cfe-commits
@@ -7706,7 +7706,7 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, // FIXME: The language rules don't say what happens in this case. // FIXME: We get an opaque dependent type out of decltype(auto) if the // expression is merely instantiati

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

2024-04-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/90376 Fix https://github.com/llvm/llvm-project/issues/68885 When build expression from a deduced argument whose kind is `Declaration` and `NTTPType`(which declared as `decltype(auto)`) is deduced as a reference type, `

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

2024-04-28 Thread Qizhi Hu via cfe-commits
@@ -8508,6 +8507,16 @@ Sema::BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg, } else { assert(ParamType->isReferenceType() && "unexpected type for decl template argument"); +if (ParamType->isLValueReferenceType()) + if (NonTypeTemp

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

2024-04-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/90376 >From 641f3e695c4bf7cd67e9aff0e0d345b59ad88685 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 28 Apr 2024 14:24:30 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on template partial specialization with issue o

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

2024-04-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/90376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/90376 >From f28eba548ae942ab3e567e7b2550a461e8fd5eac Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 28 Apr 2024 14:24:30 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on template partial specialization with issue o

<    1   2   3   4   5   >