https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/99032
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/99622
None
>From 0fdc7b5dd850c522a7b485d7b6ba8a890739e604 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Jul 2024 11:42:44 +0200
Subject: [PATCH] [clang] Add `std::span` to the default gsl pointer annotation
hokein wrote:
> Hmm. Can/should we also make these const?
Yes, I will change them in a follow-up patch.
https://github.com/llvm/llvm-project/pull/99622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/99622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Haojian Wu
Date: 2024-07-19T13:13:01+02:00
New Revision: e404eed24bebd5e3e04fc153eb330bae7d92107f
URL:
https://github.com/llvm/llvm-project/commit/e404eed24bebd5e3e04fc153eb330bae7d92107f
DIFF:
https://github.com/llvm/llvm-project/commit/e404eed24bebd5e3e04fc153eb330bae7d92107f.diff
LO
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/99637
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein commented:
Thanks, the diagnostics in the test look much better.
There is an ambiguous case that I'm a little concerned about: if the alias
template parameter and the underlying template parameter have the same name,
the synthesized deduction guide may end up with two
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/99840
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/98788
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,260 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++23 -verify %s
+
+namespace test1 {
+ template struct Base {
+template requires true
+Base(T);
+ };
+
+ template struct InheritsCtors : public Base {
+using Base::Base;
+ };
+
+ InheritsCtors inheritsCtors
@@ -1426,6 +1727,34 @@ void Sema::DeclareImplicitDeductionGuides(TemplateDecl
*Template,
if (!AddedAny)
Transform.buildSimpleDeductionGuide(std::nullopt);
+ // FIXME: Handle explicit deduction guides from inherited constructors
+ // when the base deduction guides are
https://github.com/hokein commented:
I haven't finished the review yet, some initial comments.
https://github.com/llvm/llvm-project/pull/98788
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
@@ -936,19 +940,21 @@ Expr *buildIsDeducibleConstraint(Sema &SemaRef,
Context.DeclarationNames.getCXXDeductionGuideName(AliasTemplate));
};
+ TemplateDecl *TD = DeducingTemplate ? DeducingTemplate : AliasTemplate;
+
SmallVector IsDeducibleTypeTraitArgs = {
@@ -0,0 +1,260 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++23 -verify %s
+
hokein wrote:
Can you add testcases for the template parameter packs? e.g.
```
template struct B {
B(T...);
};
template struct C : public B {
using B::B;
};
C c(1);
```
https://
@@ -1957,17 +1957,26 @@ class CXXDeductionGuideDecl : public FunctionDecl {
ExplicitSpecifier ES,
const DeclarationNameInfo &NameInfo, QualType T,
TypeSourceInfo *TInfo, SourceLocation EndLocation,
-
@@ -0,0 +1,260 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++23 -verify %s
hokein wrote:
nit: you need to adjust the diagnostic messages after the
https://github.com/llvm/llvm-project/commit/c7bfc41860a6abe5c92dc5afb47348b0c9e69963
https://github.com/llvm/llvm-p
@@ -980,19 +986,69 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
+// Build the type for a deduction guide generated from an inherited constructor
+// [over.match.class.deduct]p1.10:
+// ... the
@@ -980,19 +986,69 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
+// Build the type for a deduction guide generated from an inherited constructor
+// [over.match.class.deduct]p1.10:
+// ... the
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/99843
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein approved this pull request.
oops, good catch!
https://github.com/llvm/llvm-project/pull/99907
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/99907
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -58,7 +58,7 @@ Bar s(1);
DeductionGuideVisitor::Lang_CXX2a));
}
-TEST(RecursiveASTVisitor, DeductionGuideImplicitMode) {
+TEST(RecursiveASTVisitor, DISABLED_DeductionGuideImplicitMode) {
DeductionGuideVisitor Visitor(/*ShouldVisitImplicitCode*/ true);
Visitor.Ex
Author: Haojian Wu
Date: 2024-07-22T20:31:25+02:00
New Revision: 2ef12b55b2a655262b03204581076522261d5eb3
URL:
https://github.com/llvm/llvm-project/commit/2ef12b55b2a655262b03204581076522261d5eb3
DIFF:
https://github.com/llvm/llvm-project/commit/2ef12b55b2a655262b03204581076522261d5eb3.diff
LO
@@ -58,7 +58,7 @@ Bar s(1);
DeductionGuideVisitor::Lang_CXX2a));
}
-TEST(RecursiveASTVisitor, DeductionGuideImplicitMode) {
+TEST(RecursiveASTVisitor, DISABLED_DeductionGuideImplicitMode) {
DeductionGuideVisitor Visitor(/*ShouldVisitImplicitCode*/ true);
Visitor.Ex
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/89731
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 2385c46a2ae67e0890a7232fdec16b0b92da060b Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/3] [clang] CTAD: implement the missing IsDeducible
constraint for a
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 2385c46a2ae67e0890a7232fdec16b0b92da060b Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/3] [clang] CTAD: implement the missing IsDeducible
constraint for a
@@ -868,13 +868,7 @@ C++20 implementation status
Class template argument deduction for alias templates
https://wg21.link/p1814r0";>P1814R0
-
-
- Clang 19 (Partial)
- The associated constraints (over.match.class.deduct#3.3) for th
hokein wrote:
OK, I have hidden the `__is_deducible` trait as suggested. Please take another
look.
https://github.com/llvm/llvm-project/pull/89358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
hokein wrote:
> > OK, I have hidden the `__is_deducible` trait as suggested. Please take
> > another look.
>
> Sorry, I think my suggestion was not clear enough. did you try to put
> `TYPE_TRAIT_2(/**/, IsDeducible, KEYCXX)` in `TokenKinds.def` (and then other
> headers should _NOT_ be modifi
hokein wrote:
> > Ah, I see. I haven't tried that, but one downside I can see is that it will
> > make diagnostics for CTAD worse, we need to spell the type trait name in
> > error messages when the __is_deducible trait fails.
>
> I think we should have a custom diag for that anyway "is not de
hokein wrote:
It appears that the consensus is to avoid exposing the internal
`__is_deducible` type trait to end-users, as there are no compelling use cases
and it's not expected to be used in libc++. This also aligns with the approach
taken by GCC.
Regarding implementation, the current table
hokein wrote:
Friendly ping, it is ready for the second round of review.
https://github.com/llvm/llvm-project/pull/86512
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
> @hokein Independently of the direction taken I'd like to see a better
> diagnostic than "atomic constraint using an undocumented/cryptic trait that
> is not in the code is not satisfied".
> So when we try to print atomic constraints, we should do something more user
> friendly
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/82776
>From 3ab1a074592f85715c061007c56c69c24794a556 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 23 Feb 2024 10:03:16 +0100
Subject: [PATCH 1/2] [clang] Add __builtin_start_object_lifetime builtin.
This patch
hokein wrote:
Friendly ping.
https://github.com/llvm/llvm-project/pull/82776
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/90466
Having them dump is useful for ad-hoc debugging (context:
https://github.com/llvm/llvm-project/issues/90046)
>From b584fab7f2283535d4a04bc55efec6ff508870de Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 29
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90466
>From b584fab7f2283535d4a04bc55efec6ff508870de Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 29 Apr 2024 15:04:01 +0200
Subject: [PATCH 1/2] [AST] Dump explicit template arguments for
UnreslovedLookupExpr.
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90466
>From b584fab7f2283535d4a04bc55efec6ff508870de Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 29 Apr 2024 15:04:01 +0200
Subject: [PATCH 1/2] [AST] Dump explicit template arguments for
UnreslovedLookupExpr.
@@ -107,3 +107,17 @@ auto FooFunc(C auto V) -> C decltype(auto) {
}
}
+
+namespace dump_unreslove_lookup_arguments {
hokein wrote:
ah, good catch. I moved to a generic place, ast-dump-templates.cpp.
https://github.com/llvm/llvm-project/pull/90466
___
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/90466
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/90466
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/103716
>From 24a84b35dba03ca80027efcc87b4628c378991ff Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 14 Aug 2024 10:18:09 +0200
Subject: [PATCH] [clang] Add lifetimebound attr to std::span/std::string_view
constr
@@ -216,6 +216,59 @@ void Sema::inferGslOwnerPointerAttribute(CXXRecordDecl
*Record) {
inferGslPointerAttribute(Record, Record);
}
+void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) {
+ if (FD->getNumParams() == 0)
+return;
+
+ if (unsigned BuiltinID = FD->getB
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/103716
>From 24a84b35dba03ca80027efcc87b4628c378991ff Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 14 Aug 2024 10:18:09 +0200
Subject: [PATCH 1/2] [clang] Add lifetimebound attr to
std::span/std::string_view co
https://github.com/hokein closed
https://github.com/llvm/llvm-project/pull/103716
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -203,7 +203,7 @@ class ASTWalker : public RecursiveASTVisitor {
bool VisitUsingDecl(UsingDecl *UD) {
for (const auto *Shadow : UD->shadows()) {
auto *TD = Shadow->getTargetDecl();
- auto IsUsed = TD->isUsed() || TD->isReferenced();
+ auto IsUsed = TD->i
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/106430
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/106430
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -203,7 +203,7 @@ class ASTWalker : public RecursiveASTVisitor {
bool VisitUsingDecl(UsingDecl *UD) {
for (const auto *Shadow : UD->shadows()) {
auto *TD = Shadow->getTargetDecl();
- auto IsUsed = TD->isUsed() || TD->isReferenced();
+ auto IsUsed = TD->i
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/106706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -146,9 +148,24 @@ class ASTWalker : public RecursiveASTVisitor {
//
// If it's an enum constant, it must be due to prior decl. Report
references
// to it when qualifier isn't a type.
-if (llvm::isa(FD)) {
- if (!DRE->getQualifier() || DRE->getQualifier(
Author: Haojian Wu
Date: 2024-09-01T15:40:44+02:00
New Revision: 57ef16c699c274b7f3eee12e5c2896e193f513c4
URL:
https://github.com/llvm/llvm-project/commit/57ef16c699c274b7f3eee12e5c2896e193f513c4
DIFF:
https://github.com/llvm/llvm-project/commit/57ef16c699c274b7f3eee12e5c2896e193f513c4.diff
LO
Author: Haojian Wu
Date: 2024-09-01T16:19:18+02:00
New Revision: 7b2fe84ff57b49f6275bc12d47f87a1887919d9e
URL:
https://github.com/llvm/llvm-project/commit/7b2fe84ff57b49f6275bc12d47f87a1887919d9e
DIFF:
https://github.com/llvm/llvm-project/commit/7b2fe84ff57b49f6275bc12d47f87a1887919d9e.diff
LO
@@ -944,12 +950,67 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
+struct InheritedConstructorDeductionInfo {
+ TemplateDecl *DerivedClassTemplate;
hokein wrote:
nit: would be
@@ -944,12 +950,67 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
+struct InheritedConstructorDeductionInfo {
+ TemplateDecl *DerivedClassTemplate;
+ TypeSourceInfo *CCType;
+};
+
+// Build th
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
->getDeductionCandidateKind() == DeductionCandidate::Aggregate)
continue;
-BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc);
+BuildDeductionGuideForTypeAlias(Sema
@@ -1216,10 +1324,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
->getDeductionCandidateKind() == DeductionCandidate::Aggregate)
continue;
-BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc);
+BuildDeductionGuideForTypeAlias(Sema
@@ -944,12 +950,67 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
+struct InheritedConstructorDeductionInfo {
+ TemplateDecl *DerivedClassTemplate;
+ TypeSourceInfo *CCType;
+};
+
+// Build th
@@ -1216,10 +1308,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
->getDeductionCandidateKind() == DeductionCandidate::Aggregate)
continue;
-BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc);
+BuildDeductionGuideForTypeAlias(Sema
@@ -1216,10 +1324,225 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
->getDeductionCandidateKind() == DeductionCandidate::Aggregate)
continue;
-BuildDeductionGuideForTypeAlias(SemaRef, AliasTemplate, F, Loc);
+BuildDeductionGuideForTypeAlias(Sema
hokein wrote:
> The current implementation strictly follows the standard's specification for
> replacing the return type of an alias deduction guide.
>
> However, this approach adds some implicit declarations in the AST (in terms
> of the partial class template specialization), which is cumber
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/106997
Fixes #106372
>From 88600fb5e7395d4eefb6be24689248b7be2d4115 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 28 Aug 2024 12:11:28 +0200
Subject: [PATCH] [clang] Respect the lifetimebound in user-defined ope
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/106997
>From 88600fb5e7395d4eefb6be24689248b7be2d4115 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 28 Aug 2024 12:11:28 +0200
Subject: [PATCH 1/2] [clang] Respect the lifetimebound in user-defined
operator.
--
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/106997
>From 88600fb5e7395d4eefb6be24689248b7be2d4115 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 28 Aug 2024 12:11:28 +0200
Subject: [PATCH 1/3] [clang] Respect the lifetimebound in user-defined
operator.
--
https://github.com/hokein edited
https://github.com/llvm/llvm-project/pull/106997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein commented:
Thanks for the quick review.
https://github.com/llvm/llvm-project/pull/106997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -968,6 +972,23 @@ static bool pathOnlyHandlesGslPointer(IndirectLocalPath
&Path) {
return false;
}
+static bool isAssginmentOperatorLifetimeBound(CXXMethodDecl *CMD) {
+ if (!CMD)
+return false;
+ assert(CMD->getOverloadedOperator() == OverloadedOperatorKind::OO_Eq
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/106997
>From 040c7646a037652f0c00a97de767a3f96ebbd1d3 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 28 Aug 2024 12:11:28 +0200
Subject: [PATCH 1/3] [clang] Respect the lifetimebound in user-defined
operator.
--
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/96686
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/98013
>From c9297f8abe8d480fdcd3ba6d6598268fef74ddb4 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 8 Jul 2024 13:19:13 +0200
Subject: [PATCH 1/2] [clang] CTAD: use index and depth to retrieve template
parameters
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/98013
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform {
// Find all template parameters that appear in the given DeducedArgs.
// Return the indices of the template parameters in the TemplateParams.
SmallVector TemplateParamsReferencedInTemplateArgumentList(
https://github.com/hokein commented:
Thanks for the review.
https://github.com/llvm/llvm-project/pull/98013
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -99,3 +99,28 @@ BFoo b2(1.0, 2.0);
// CHECK-NEXT: | | |-ParmVarDecl {{.*}} 'type-parameter-0-0'
// CHECK-NEXT: | | `-ParmVarDecl {{.*}} 'type-parameter-0-0'
// CHECK-NEXT: | `-CXXDeductionGuideDecl {{.*}} implicit used 'auto (double, double) -> Foo' implicit_instantiation
+
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform {
// Find all template parameters that appear in the given DeducedArgs.
// Return the indices of the template parameters in the TemplateParams.
SmallVector TemplateParamsReferencedInTemplateArgumentList(
@@ -2653,20 +2653,34 @@ struct ConvertConstructorToDeductionGuideTransform {
// Find all template parameters that appear in the given DeducedArgs.
// Return the indices of the template parameters in the TemplateParams.
SmallVector TemplateParamsReferencedInTemplateArgumentList(
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/98013
>From c9297f8abe8d480fdcd3ba6d6598268fef74ddb4 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 8 Jul 2024 13:19:13 +0200
Subject: [PATCH 1/3] [clang] CTAD: use index and depth to retrieve template
parameters
hokein wrote:
> We're seeing some -Wdangling-assignment warnings after this change, and they
> all seem to be false positives so far: https://crbug.com/350808950 It's not a
> huge deal if there are just a few, but figured it's worth mentioning.
Thanks for the report. That's interesting. Techni
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/98013
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/98613
After commit ce4aada6e2135e29839f672a6599db628b53295d, we observed many
warnings in our internal codebase. It is
infeasible to fix all at once.
Currently, there is no way to disable this warning. This patch pro
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/98613
>From d22741375619b2b134509049aad7958348abcc30 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 12 Jul 2024 12:26:07 +0200
Subject: [PATCH 1/2] [clang] Allow to opt out the
missing_dependent_template_keyword
hokein wrote:
> Reasonable, LGTM. Perhaps a release note should be added?
Thanks for the review. Done.
https://github.com/llvm/llvm-project/pull/98613
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/98613
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
It does filter out the `missing-dependent-template-keyword` warnings, but
doesn't fix the absl case.
With
https://github.com/llvm/llvm-project/commit/ce4aada6e2135e29839f672a6599db628b53295d,
there is a behavior change in clang. Clang reject the following code which was
accepte
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/98524
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
> @pranavk see #98613.
>
> edit: sorry, the error recovery that is currently performed will not detect
> cases where the template argument list does not contain a a type. i can look
> into this monday.
Some analysis:
given the example `this->StorageT` where `I` is an `int`, the
hokein wrote:
Summaries of changes after this patch:
1) for type template parameters and template template parameters, clang emits a
warning, which can be suppressed by `-Wno-missing-dependent-templat-keyword`
(after #98613);
2) for non-type template parameters, clang emits a hard `no_member`
hokein wrote:
@sdkrystian, I think we need to temporarily revert your patch (and sorry for
that), as there is no way to fully preserve the old behavior of clang (our
integration has been blocking since last week, and I think other large projects
may encounter this issue as well):
- The `-Wno-
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/90894
For alias templates, our current way of constructing their aggregate deduction
guides deviates from the standard approach. We should align it with how we
handle implicit deduction guides.
This patch has a refact
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90894
>From 67b790e8a0e3f86155c2569373ced29ddd61c16b Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 2 May 2024 21:06:15 +0200
Subject: [PATCH 1/2] [clang] CTAD: fix the aggregate deduction guide for alias
templat
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given unde
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/90948
With the commit d5308949cf884d8e4b971d51a8b4f73584c4adec, we now preserve the
initializer for invalid decls with the recovery-expr.
However there is a chance that the original init expr is a typo-expr, we should
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90894
>From 40365147f7aabeaaefd7e9bf6f2b96d6f7135992 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 3 May 2024 10:53:54 +0200
Subject: [PATCH 1/2] Refactor: Extract the core deduction-guide construction
implement
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given unde
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given unde
@@ -261,6 +261,13 @@ AG ag = {1};
// CHECK: | `-BuiltinType {{.*}} 'int'
// CHECK: `-ParmVarDecl {{.*}} 'int'
+template
+using BG = G;
+BG bg = {1.0};
+// CHECK-LABEL: Dumping
+// CHECK: FunctionTemplateDecl
hokein wrote:
It is not possible to use the `
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++2a -verify -ast-dump -ast-dump-decl-types
-ast-dump-filter "deduction guide" %s | FileCheck %s --strict-whitespace
+// RUN: %clang_cc1 -std=c++2a -verify -ast-dump -ast-dump-decl-types
-Wno-c++11-narrowing -ast-dump-filter "deduction g
@@ -2803,7 +2803,207 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef,
TypeAliasTemplateDecl *AliasTemplate) {
return {Template, AliasRhsTemplateArgs};
}
-// Build deduction guides for a type alias template.
+// Build deduction guides for a type alias template from the given unde
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/90948
>From 2f29011bae5bf1b285c2ab1700c887d74eaec4b0 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 3 May 2024 10:06:39 +0200
Subject: [PATCH 1/2] [clang] Don't preserve the typo expr in the recovery expr
for inv
2301 - 2400 of 3165 matches
Mail list logo