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
@@ -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
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-
=?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 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
@@ -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 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-
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 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 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-
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
jcsxky wrote:
@sdkrystian Could you please take another look at this patch? The approach
does what you said before.
When checking exception specific equivalence of the two functions, we do
instantiation and substitute all the template parameters with instantiated
ones. But we can't find them
https://github.com/jcsxky edited
https://github.com/llvm/llvm-project/pull/102267
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jcsxky wrote:
> substitute so all references to template parameters have the correct depth
@sdkrystian Agree! The underlying issue is the incorrect depth makes the
comparison of the operands of the `noexcept-specifier` failed. because clang
can't find instantiated template parameter declaratio
@@ -599,3 +599,39 @@ template
unsigned long DerivedCollection::index() {}
} // namespace GH72557
+
+namespace GH102320 {
+
+template
+concept Constrained = true;
+
+template class C {
+ template > class D;
+ template
+requires Constrained
+ class E;
+};
+
+template
jcsxky wrote:
> Note that @jcsxky has a similar patch #102554 that fixes the same thing. I
> don't intend to contend against him, and admittedly, that patch works.
>
> But I don't think that approach is so reasonable because it is hacky in that
> `ForConstraintInstantiation` is disabled in the
https://github.com/jcsxky closed
https://github.com/llvm/llvm-project/pull/102554
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -951,7 +951,8 @@ static const Expr
*SubstituteConstraintExpressionWithoutSatisfaction(
DeclInfo.getDecl(), DeclInfo.getLexicalDeclContext(), /*Final=*/false,
/*Innermost=*/std::nullopt,
/*RelativeToPrimary=*/true,
- /*Pattern=*/nullptr, /*ForConstrain
jcsxky wrote:
> I'm sorry but this approach doesn't make sense to me.
>
> I have to say that I self-assigned the issue hours before this patch (I don't
> know when you started working on it because you haven't explained anything
> either), and that means I'll look into that recently since I've
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/102554
Skip adding template instantiation arguments when the declaration is a nested
class template when instantiating constraint expression.
attempt to fix https://github.com/llvm/llvm-project/issues/102320
>From 0080
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
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
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
`
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
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 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
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 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
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
jcsxky wrote:
> Hi @jcsxky , I fetched and rebased to origin/main just now (6/16/2024 at
> 4:30pm Central US time), and rebuilt - and I see the crash. Did you try
> rebasing to latest source and rebuilding?
>
> `$ clang --analyze -Xclang -analyzer-config -Xclang
> experimental-enable-naive-ct
jcsxky wrote:
```cpp
ls
bstrwrap.cpp bstrwrap.h ctudir test.cpp test.plist test.sh
cat bstrwrap.cpp
#include "bstrwrap.h"
#include
Bstrlib::CBString::CBString () {
}
cat bstrwrap.h
#include
namespace Bstrlib {
struct CBString {
CBString ();
};
extern std::istream& getline (void);
}
cat
jcsxky wrote:
> This change has caused a regression in one of our systems integration tests
> that test static analysis for the bstring lib project
> (https://github.com/websnarf/bstrlib) with cross translation unit analysis
> enabled. Unfortunately I do not have a simple reproducer that stand
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/94942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jcsxky wrote:
> So, looked into this more. You are correct that `Function` needs not be
> dependent because we only ever show the name of the function unqualified.
> However, `FunctionSig` does. Here is an example of what we are trying to
> preserve https://godbolt.org/z/M3eTa8nn5 (the clang 1
jcsxky wrote:
```cpp
struct BasicPersistent;
struct SourceLocation {
static constexpr const char* Current(const char * func =
__builtin_FUNCTION()) {
return func;
}
};
template BasicPersistent &&__declval(int);
template auto declval() -> decltype(__declval<_Tp>(0));
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/94942
>From 96f4e2a5c82296b61e53189135d88a2d2b0da9f4 Mon Sep 17 00:00:00 2001
From: Qizhi Hu <836744...@qq.com>
Date: Mon, 10 Jun 2024 16:53:54 +0800
Subject: [PATCH] [clang] SourceLocIdentKind::Function should not be de
jcsxky wrote:
> Needs changes as discussed.
> Needs changes as discussed.
I am really appreciate for your guidance and I will check in the weekend.
https://github.com/llvm/llvm-project/pull/94725
___
cfe-commits mailing list
cfe-commits@lists.llvm.
jcsxky wrote:
> SourceLocation needs to be dependent because we want to make the name of the
> function and any template parameter refers to the instantiated function
> rather than that of the function template. This was changed in #78436
>
> The issue is that SourceLocation then is a dependen
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/95190
___
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/95190
>From ba081d51a0cc803188760eec2847bfc73d2192b8 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Wed, 12 Jun 2024 09:47:16 +0800
Subject: [PATCH] [StructuralEquivalence] improve NTTP and
CXXDependentScopeMemberExpr co
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/95190
>From 157f664408062da41f4d82d20ddc06e0e563fe31 Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Wed, 12 Jun 2024 09:47:16 +0800
Subject: [PATCH] [StructuralEquivalence] improve NTTP and
CXXDependentScopeMemberExpr co
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/95190
improve `ASTStructuralEquivalenceTest`:
1. compare the depth and index of NTTP
2. provide comparison of `CXXDependentScopeMemberExpr` to `StmtCompare`.
>From 644c6e8499285e5b3ab17193ec63eed051dae583 Mon Sep 17 00
jcsxky wrote:
> because we want to make the name of the function and any template parameter
refers to the instantiated function rather than that of the function template.
Does that mean we should transform the `SourceLocExpr` into a certain function
name when instantiating if it is `__builtin_
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/94942
Consider the testcase, return type of `construct_at` is
```cpp
DecltypeType 0x5570d8c0 'decltype(new struct BasicPersistent(declval()))' sugar dependent
|-CXXNewExpr 0x5570d880 'struct BasicPersistent *' Fu
https://github.com/jcsxky ready_for_review
https://github.com/llvm/llvm-project/pull/94725
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jcsxky wrote:
crash on trunk assertion.
https://github.com/llvm/llvm-project/pull/94725
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/94725
___
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 a1754c56a3293cd6529244f9a0f7486f4912e18d 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 2977f65d503c2a96247705ce50157870aaefa003 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 57576620fc412015bd19a34e12be61f4b81eb655 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/lib/Sema/TreeTr
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/94725
>From 6a90ef0b3947a0de2d6453856c80d8f0fd393548 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/lib/Sema/TreeTr
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/94725
>From 917cd980ed6a130b9f175492638afa22a1246c5c 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/lib/Sema/SemaTe
https://github.com/jcsxky converted_to_draft
https://github.com/llvm/llvm-project/pull/94725
___
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/94725
None
>From 9fc6172cb3ef627eb7d4e939dff6f4504c06150a 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/lib/Sema/
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/93923
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1442,19 +1442,27 @@ SourceLocation
CXXUnresolvedConstructExpr::getBeginLoc() const {
CXXDependentScopeMemberExpr::CXXDependentScopeMemberExpr(
const ASTContext &Ctx, Expr *Base, QualType BaseType, bool IsArrow,
SourceLocation OperatorLoc, NestedNameSpecifierLoc Qua
@@ -9674,6 +9674,40 @@ TEST_P(ASTImporterOptionSpecificTestBase,
ImportInstantiatedFromMember) {
EXPECT_TRUE(ImportedPartialSpecialization->getInstantiatedFromMember());
}
+AST_MATCHER_P(EnumDecl, hasEnumConstName, StringRef, ConstName) {
+ for (EnumConstantDecl *D : Node.
@@ -9674,6 +9674,40 @@ TEST_P(ASTImporterOptionSpecificTestBase,
ImportInstantiatedFromMember) {
EXPECT_TRUE(ImportedPartialSpecialization->getInstantiatedFromMember());
}
+AST_MATCHER_P(EnumDecl, hasEnumConstName, StringRef, ConstName) {
+ for (EnumConstantDecl *D : Node.
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/93923
>From 7e602ae8d3c7ca0c3218d8ce9106510c43b6295b Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Fri, 31 May 2024 13:12:41 +0800
Subject: [PATCH 1/2] [clang][ASTImport] fix issue on anonymous enum import
---
clang/li
@@ -9674,6 +9674,27 @@ TEST_P(ASTImporterOptionSpecificTestBase,
ImportInstantiatedFromMember) {
EXPECT_TRUE(ImportedPartialSpecialization->getInstantiatedFromMember());
}
+TEST_P(ASTImporterOptionSpecificTestBase, ImportAnonymousEnum) {
+ const char *ToCode =
+ R"(
+
jcsxky wrote:
> Does this work on the following code?
>
> ```
> struct A {
> enum { E1,E2 } x;
> enum { E3,E4 } y;
> };
> ```
I have updated testcase according to your suggestion to demonstrate this
solution works correctly on the testcase above.
https://github.com/
https://github.com/jcsxky updated
https://github.com/llvm/llvm-project/pull/93923
>From 7e602ae8d3c7ca0c3218d8ce9106510c43b6295b Mon Sep 17 00:00:00 2001
From: huqizhi
Date: Fri, 31 May 2024 13:12:41 +0800
Subject: [PATCH 1/2] [clang][ASTImport] fix issue on anonymous enum import
---
clang/li
https://github.com/jcsxky created
https://github.com/llvm/llvm-project/pull/93923
Don't skip searching in `ToContext` during importing `EnumDecl`. And
`IsStructuralMatch` in `StructralEquivalence` can make sure to determine
whether the found result is match or not.
>From 7e602ae8d3c7ca0c3218d
jcsxky wrote:
> So After we have formed a TemplateSpecializationType, we are done with the
> NNS. We keep it around in an ElaboratedType for type sugar only, it should
> not be needed to compile the program correctly anymore.
>
> So I think this solution violates one important aspect of our AS
jcsxky wrote:
@mizvekov After I apply you changes in this patch,
https://github.com/llvm/llvm-project/issues/91677 is still crash(although it
makes sense with `-ast-dump` option). I put it below for explanation clearly:
```cpp
template struct t1 {
template
struct t2 {};
};
template
t1::
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/93411
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
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 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
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 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
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
> > `
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
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:
> 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 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
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
@@ -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 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
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 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 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 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
@@ -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
@@ -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);
jcsxky wrote:
Done.
https://github.com/llvm/llvm-project/pull/91430
___
cfe-commits mailing
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
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
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 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
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 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
@@ -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
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
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
1 - 100 of 474 matches
Mail list logo