https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/87173
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/89862
attempt to fix
https://github.com/llvm/llvm-project/issues/68885#issuecomment-1764201896
Deduction of NTTP whose type is `decltype(auto)` would create an implicit cast
expression to dependent type and makes the t
@@ -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
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,
`
@@ -8508,6 +8507,16 @@ Sema::BuildExpressionFromDeclTemplateArgument(const
TemplateArgument &Arg,
} else {
assert(ParamType->isReferenceType() &&
"unexpected type for decl template argument");
+if (ParamType->isLValueReferenceType())
+ if (NonTypeTemp
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
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
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
jcsxky wrote:
Windows CI failed with an unrelated file.
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
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/90376
>From cb7acd79aea4af3e92b5317e55fb43cabc7ebb40 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
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/90376
>From 947096950049ac7047a26335a993e48c1fa5c16d 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
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/89862
>From 242b88a37f08bb66bcdde5e5b30c43553107d29c Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Wed, 24 Apr 2024 09:37:53 +0800
Subject: [PATCH] [Clang][Sema] fix a bug on template partial specialization
---
clang/d
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/89862
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/90376
>From c5c67ed879fc58e5371de6fc8296b7b6f653a072 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
https://github.com/jcsxky closed 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
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/90646
attempt to fix https://github.com/llvm/llvm-project/issues/90349
Skip to add outer class template arguments to `MTAL` when the friend function
has the same depth with its lexical context(`CXXRecordDecl`).
>From e
jcsxky wrote:
> I'm actually working on constraint checking for function template
> specializations in #88963. I don't think this patch is quite right... this
> will cause a crash if the befriended function is a member of a class template
> specialization. Relative to the changes in #88963, I
jcsxky wrote:
Windows CI failed with some unrelated files.
https://github.com/llvm/llvm-project/pull/90646
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jcsxky wrote:
> ```c++
> template
> concept D = sizeof(T) == sizeof(U);
>
> template
> struct A
> {
> template requires D
> static void f();
> };
>
> template
> struct B
> {
> template
> struct C
> {
> friend void A::f();
> };
> };
>
> template struct B::C;
>
>
@@ -275,6 +275,13 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl
*Function,
TemplateArgs->asArray(),
/*Final=*/false);
+if (RelativeToPrimary &&
+(Function->getTemplateSpeciali
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/90646
>From 50aa5b64f6d2cf98706bfb4792f274bd071e3b9c Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Wed, 1 May 2024 02:25:04 +0800
Subject: [PATCH 1/2] [Clang][Sema] fix a bug on constraint check with t
jcsxky wrote:
> I agree with @sdkrystian, even though the test crashes for maybe yet another
> reason, it demonstrates you can friend a function from a different template
> context, so comparing the depths from different branches is not helpful.
@mizvekov I missed the case which friend functio
@@ -275,6 +275,13 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl
*Function,
TemplateArgs->asArray(),
/*Final=*/false);
+if (RelativeToPrimary &&
+(Function->getTemplateSpeciali
jcsxky wrote:
> This still doesn't handle cases such as:
>
> ```c++
> template
> concept E = sizeof(T) == sizeof(U) && sizeof(V) == sizeof(W);
>
> template // T = char
> struct A
> {
> template // U = signed char
> struct B
> {
> template // V = int, W = int, X =
> short
>
@@ -275,6 +275,13 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl
*Function,
TemplateArgs->asArray(),
/*Final=*/false);
+if (RelativeToPrimary &&
+(Function->getTemplateSpeciali
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/91430
attempt to fix https://github.com/llvm/llvm-project/issues/12361
Consider this example:
```cpp
class D {
class E{
class F{}; // expected-note{{implicitly declared private here}}
friend void foo
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/91430
>From a4eee6db746e8de0743369f701d1b6a3fcc84754 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Tue, 7 May 2024 22:32:39 +0800
Subject: [PATCH] [Clang][Sema] access checking of friend declaration sh
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/91430
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jcsxky wrote:
> Can you add a changelog entry?
Ah, I forgot that! will be added when applying other reviews.
https://github.com/llvm/llvm-project/pull/91430
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/91430
>From a4eee6db746e8de0743369f701d1b6a3fcc84754 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Tue, 7 May 2024 22:32:39 +0800
Subject: [PATCH 1/2] [Clang][Sema] access checking of friend declaratio
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/91430
>From ec4f21b7823a89a793b0799b22c6bbdb0bfb4c52 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Tue, 7 May 2024 22:32:39 +0800
Subject: [PATCH 1/2] [Clang][Sema] access checking of friend declaratio
@@ -1477,8 +1477,16 @@ static Sema::AccessResult CheckAccess(Sema &S,
SourceLocation Loc,
// void foo(A::private_type);
jcsxky wrote:
Done.
https://github.com/llvm/llvm-project/pull/91430
___
cfe-commits mailing
@@ -229,6 +229,8 @@ void Scope::dumpImpl(raw_ostream &OS) const {
{ClassInheritanceScope, "ClassInheritanceScope"},
{CatchScope, "CatchScope"},
{OpenACCComputeConstructScope, "OpenACCComputeConstructScope"},
+ {TypeAliasScope, "TypeAliasScope"},
-
@@ -1477,8 +1477,16 @@ static Sema::AccessResult CheckAccess(Sema &S,
SourceLocation Loc,
// void foo(A::private_type);
// void B::foo(A::private_type);
if (S.DelayedDiagnostics.shouldDelayDiagnostics()) {
-S.DelayedDiagnostics.add(DelayedDiagnostic::makeAccess(L
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/91430
>From 324e4361b4cb1b17065b4dc7d4bdfa41fe781e7d Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Tue, 7 May 2024 22:32:39 +0800
Subject: [PATCH 1/2] [Clang][Sema] access checking of friend declaratio
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/91430
>From 002751420c7f71fa9903d94e135565793bd8c6f8 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Tue, 7 May 2024 22:32:39 +0800
Subject: [PATCH 1/2] [Clang][Sema] access checking of friend declaratio
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/91430
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/91842
attempt to fix
`isSameTemplateArg` returns incorrect result since clang didn't visit
constraint of NTTP. Furthermore, It makes class template partial
specialization not more specialized than the class template
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/91842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -79,14 +79,14 @@ template struct Y2 {}; //
expected-note {{partial
template class U, typename... Z>
struct Y3 { Y3()=delete; };
template class U, typename... Z>
-struct Y3 { Y3()=delete; };
+struct Y3 { Y3()=delete; }; // expected-note {{partial
specialization matches [wit
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/91842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -79,14 +79,14 @@ template struct Y2 {}; //
expected-note {{partial
template class U, typename... Z>
struct Y3 { Y3()=delete; };
template class U, typename... Z>
-struct Y3 { Y3()=delete; };
+struct Y3 { Y3()=delete; }; // expected-note {{partial
specialization matches [wit
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/91842
>From 4133001711b82c93e057e1bd05476c5d052d597f Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Sat, 11 May 2024 14:04:23 +0800
Subject: [PATCH] [clang] visit constraint of NTTP
---
clang/docs/ReleaseNotes.rst
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/91842
>From 0ebdcec675c39b26b8bee1a8b07c12fae2c58523 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Sat, 11 May 2024 14:04:23 +0800
Subject: [PATCH] [clang] visit constraint of NTTP
---
clang/docs/ReleaseNotes.rst
jcsxky wrote:
> I don't think this is the right approach. I stepped though the example and
> the reason we reject is because:
>
> * We substitute a dependent `AutoType` in for the types of the template
> parameters when they are initially built.
> * We call `getMoreSpecialized` determine wheth
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/78896
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jcsxky wrote:
> A test is needed to make the change acceptable but I could not find an easy
> case to provoke the situation. The problem looks to be related to his code:
>
> ```c++
> using size_t = int;
> template class tuple;
>
> template
> struct integral_constant
> {
> static constexpr
jcsxky wrote:
> > Could you please show your commands which reproduced this crash? I tested
> > locally with the following commands and it runs OK.
> > ```c++
> > clang++ -cc1 -std=c++17 -emit-pch -o test.cpp.ast test.cpp
> > clang++ -cc1 -x c++ -ast-merge test.cpp.ast /dev/null -ast-dump
> > `
https://github.com/jcsxky approved this pull request.
https://github.com/llvm/llvm-project/pull/89887
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/93411
Consider the following testcase:
```cpp
namespace PR12884_original {
template struct A {
struct B { ##1
template struct X {};
typedef int arg;
};
struct C {
typedef B::X x;
};
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/93411
>From f5f0b14945a70e3e4fd92d5e5cbdb428334fe2b8 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Sat, 25 May 2024 16:30:27 +0800
Subject: [PATCH 1/2] [Clang][Sema] Use correct TemplateName when trans
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/93411
>From f5f0b14945a70e3e4fd92d5e5cbdb428334fe2b8 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Sat, 25 May 2024 16:30:27 +0800
Subject: [PATCH 1/2] [Clang][Sema] Use correct TemplateName when trans
jcsxky wrote:
> The problem here is the loss of the qualification on the TemplateNames
>
> This patch fixes the problem, without taking any workarounds: #93433
>
> It also doesn't cause any change in diagnostics in
> `clang/test/SemaTemplate/typename-specifier-3.cpp`.
I think we should report
https://github.com/jcsxky closed 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
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/94725
>From 8327ee1afef04480a1a18eef169f24906e432e87 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Fri, 7 Jun 2024 14:04:52 +0800
Subject: [PATCH] [Clang][Sema] qualifier should be transformed
---
clang/docs/ReleaseNot
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/94725
>From 70928fcec829b6cb02fd9fe19b214518c872eea6 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Fri, 7 Jun 2024 14:04:52 +0800
Subject: [PATCH] [Clang][Sema] qualifier should be transformed
---
clang/docs/ReleaseNot
jcsxky wrote:
@mizvekov After looking into the code, I think we should transform qualifier in
TST. Consider the following code:
```cpp
template
t1::template t2 f1();
void f2() {
f1();
}
```
`TemplateSpecializationType` of `t2` whose `Template` is a
`QualifiedTemplateName`(`t1::`) will be de
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/94725
>From 4b1d55c56f969e926645a856ba67e289776326a8 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Fri, 7 Jun 2024 14:04:52 +0800
Subject: [PATCH] [Clang][Sema] qualifier should be transformed
---
clang/docs/ReleaseNot
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/94725
>From 8359bac8e59c6b5ebc6500042dc473c3f4245c08 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Fri, 7 Jun 2024 14:04:52 +0800
Subject: [PATCH] [Clang][Sema] qualifier should be transformed
---
clang/docs/ReleaseNot
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/94725
>From 4e9e322a82e636783d2ba0ccda92f3547d557a64 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Fri, 7 Jun 2024 14:04:52 +0800
Subject: [PATCH] [Clang][Sema] qualifier should be transformed
---
clang/docs/ReleaseNot
jcsxky wrote:
> I still don't understand why you are saying we didn't or can't build a
> DependentTemplateSpecializationType instead.
I mean we can transform `QualifiedTemplateName` to `DependentTemplateName` and
this is what this patch does. If we build a `DependentTemplateName` instead of
`
jcsxky wrote:
> We can't go back from non-dependent into dependent.
Sorry, maybe I use the word 'transform' that makes you confused. Actually, what
I did in `TransformTemplateName` is transforming a `QualifiedTemplateName`
which is dependent due to its qualifier dependency and dependent `DeclC
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/117734
>From 528bc58e7abf3eed25ca4921d968e61b52571596 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Wed, 27 Nov 2024 00:57:00 +0800
Subject: [PATCH] [clang-tidy] fix false positive in
bugprone-return-
@@ -179,7 +179,8 @@ Changes in existing checks
- Improved :doc:`bugprone-return-const-ref-from-parameter
` check to
diagnose potential dangling references when returning a ``const &`` parameter
- by using the conditional operator ``cond ? var1 : var2``.
+ by using the con
@@ -151,6 +151,12 @@ void instantiate(const int ¶m, const float ¶mf,
int &mut_param, float &m
itf6(mut_paramf);
}
+template
+void f(const T& t) {
+const auto get = [&t] -> const T& { return t; };
+return T{};
+}
jcsxky wrote:
Done.
https://g
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/117734
>From 0a7192dabd17a6ce7d506c7dbe8cbdc85527da46 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Wed, 27 Nov 2024 00:57:00 +0800
Subject: [PATCH] [clang-tidy] fix false positive in
bugprone-return-
jcsxky wrote:
> Please add positive test for lambdas.
Positive test cases have been added.
https://github.com/llvm/llvm-project/pull/117734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/117734
>From 7100846f3d04fc973fcf4535b0a8572632228ead Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Wed, 27 Nov 2024 00:57:00 +0800
Subject: [PATCH] [clang-tidy] fix false positive in
bugprone-return-
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?=
Message-ID:
In-Reply-To:
https://github.com/jcsxky approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/115734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
https://github.com/jcsxky closed
https://github.com/llvm/llvm-project/pull/117734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/117734
>From 7dd899ec58a61b02a2bd584d021dcddfb20ceaba Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Wed, 27 Nov 2024 00:57:00 +0800
Subject: [PATCH] [clang-tidy] fix false positive in
bugprone-return-
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/117734
>From 5d35398c45631a58e283899419f00e4a5e0ba722 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Wed, 27 Nov 2024 00:57:00 +0800
Subject: [PATCH] [clang-tidy] fix false positive in
bugprone-return-
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/117734
Fix https://github.com/llvm/llvm-project/issues/115743
>From 37a518b35b205e3e2e7bfbeab64d2a334519c30d Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Wed, 27 Nov 2024 00:22:05 +0800
Subject: [PAT
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/117734
>From 80e12b2ed1f324181d280cbd2fd242f63642bed6 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Wed, 27 Nov 2024 00:57:00 +0800
Subject: [PATCH] [clang-tidy] fix false positive in
bugprone-return-
401 - 474 of 474 matches
Mail list logo