@@ -10918,22 +10944,24 @@ QualType
Sema::DeduceTemplateSpecializationFromInitializer(
if (!(RD->getDefinition() && RD->isAggregate()))
return;
QualType Ty = Context.getRecordType(RD);
- SmallVector ElementTypes;
-
- InitListChecker CheckInitList(*
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/95213
>From 3c96bf1b16360f52b235d31c08644a2749e7c808 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 12 Jun 2024 11:24:10 +0200
Subject: [PATCH] [clang] Don't print extra blank when dump the template name.
---
cl
https://github.com/hokein commented:
good catch, the fix looks good to me overall, I will leave the final stamp to
@ChuanqiXu9.
(I agree that it would be nice to have a regression test if it is not too hard
to reduce from libcxx)
https://github.com/llvm/llvm-project/pull/95202
___
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/95213
None
>From c5f5d784a8cab287d3ec826a2636874ad9498563 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 12 Jun 2024 11:24:10 +0200
Subject: [PATCH] [clang] Don't print extra blank when dump the template name.
-
@@ -335,3 +335,73 @@ namespace TTP {
// CHECK-NEXT: `-TemplateArgument type 'T':'type-parameter-0-0'{{$}}
// CHECK-NEXT:`-TemplateTypeParmType {{.+}} 'T' dependent depth 0
index 0{{$}}
// CHECK-NEXT: `-TemplateTypeParm {{.+}} 'T'{{$}}
+
+namespace GH64625
@@ -10918,22 +10944,24 @@ QualType
Sema::DeduceTemplateSpecializationFromInitializer(
if (!(RD->getDefinition() && RD->isAggregate()))
return;
QualType Ty = Context.getRecordType(RD);
- SmallVector ElementTypes;
-
- InitListChecker CheckInitList(*
@@ -335,3 +335,73 @@ namespace TTP {
// CHECK-NEXT: `-TemplateArgument type 'T':'type-parameter-0-0'{{$}}
// CHECK-NEXT:`-TemplateTypeParmType {{.+}} 'T' dependent depth 0
index 0{{$}}
// CHECK-NEXT: `-TemplateTypeParm {{.+}} 'T'{{$}}
+
+namespace GH64625
@@ -305,14 +305,32 @@ namespace {
/// structured list even in 'verify only' mode, so that we can track which
/// elements need 'empty' initializtion.
class InitListChecker {
+public:
+ struct CandidateParamTypesForAggregateDeduction {
hokein wrote:
nit: inste
@@ -10918,22 +10944,24 @@ QualType
Sema::DeduceTemplateSpecializationFromInitializer(
if (!(RD->getDefinition() && RD->isAggregate()))
return;
QualType Ty = Context.getRecordType(RD);
- SmallVector ElementTypes;
-
- InitListChecker CheckInitList(*
@@ -2630,7 +2711,8 @@ struct ConvertConstructorToDeductionGuideTransform {
ParmVarDecl *transformFunctionTypeParam(
ParmVarDecl *OldParam, MultiLevelTemplateArgumentList &Args,
- llvm::SmallVectorImpl &MaterializedTypedefs) {
+ llvm::SmallVectorImpl &Material
@@ -2220,23 +2220,103 @@ namespace {
class ExtractTypeForDeductionGuide
: public TreeTransform {
llvm::SmallVectorImpl &MaterializedTypedefs;
+ ClassTemplateDecl *NestedPattern;
+ const MultiLevelTemplateArgumentList *OuterInstantiationArgs;
public:
typedef TreeTran
@@ -2220,23 +2220,103 @@ namespace {
class ExtractTypeForDeductionGuide
: public TreeTransform {
llvm::SmallVectorImpl &MaterializedTypedefs;
+ ClassTemplateDecl *NestedPattern;
+ const MultiLevelTemplateArgumentList *OuterInstantiationArgs;
public:
typedef TreeTran
https://github.com/hokein commented:
Looks roughly good to me.
https://github.com/llvm/llvm-project/pull/94740
___
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/94740
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -16,3 +16,73 @@ using T = A::B;
using Copy = decltype(copy);
using Copy = A::B;
+
+namespace GH94614 {
+
+template struct S {};
hokein wrote:
I wonder whether it is feasible to add an ast-dump test for this issue, I find
seeing and verifying the shape of
@@ -2220,23 +2220,103 @@ namespace {
class ExtractTypeForDeductionGuide
: public TreeTransform {
llvm::SmallVectorImpl &MaterializedTypedefs;
+ ClassTemplateDecl *NestedPattern;
+ const MultiLevelTemplateArgumentList *OuterInstantiationArgs;
public:
typedef TreeTran
https://github.com/hokein approved this pull request.
https://github.com/llvm/llvm-project/pull/94937
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Haojian Wu
Date: 2024-06-07T12:49:41+02:00
New Revision: 6fe5428ecbd18aa263417a244c0850b1271617c0
URL:
https://github.com/llvm/llvm-project/commit/6fe5428ecbd18aa263417a244c0850b1271617c0
DIFF:
https://github.com/llvm/llvm-project/commit/6fe5428ecbd18aa263417a244c0850b1271617c0.diff
LO
Author: Haojian Wu
Date: 2024-06-06T15:48:23+02:00
New Revision: 79393124ff74aaaf6a43f7c88e67fd76a6e44239
URL:
https://github.com/llvm/llvm-project/commit/79393124ff74aaaf6a43f7c88e67fd76a6e44239
DIFF:
https://github.com/llvm/llvm-project/commit/79393124ff74aaaf6a43f7c88e67fd76a6e44239.diff
LO
https://github.com/hokein closed 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
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/94471
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hokein wrote:
I'm landing it now to unblock our integration. I'm happy to address any post
comments.
https://github.com/llvm/llvm-project/pull/94471
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/94471
>From 8457c4aa1758d10188da5978d30d2d1ed505e01e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 5 Jun 2024 15:46:56 +0200
Subject: [PATCH 1/4] Fix clang reject valid C++ code after
d999ce0302f06d250f6d496b56a
@@ -413,7 +413,9 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit
&PTU) {
if (!ND)
continue;
// Check if we need to clean up the IdResolver chain.
-if (ND->getDeclName().getFETokenInfo())
+if (ND->getDeclName().getFETokenInfo() &&
+CI-
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/94471
>From 8457c4aa1758d10188da5978d30d2d1ed505e01e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 5 Jun 2024 15:46:56 +0200
Subject: [PATCH 1/3] Fix clang reject valid C++ code after
d999ce0302f06d250f6d496b56a
hokein wrote:
I have update a new version, please take a second look.
https://github.com/llvm/llvm-project/pull/94471
___
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/94471
>From 8457c4aa1758d10188da5978d30d2d1ed505e01e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 5 Jun 2024 15:46:56 +0200
Subject: [PATCH 1/2] Fix clang reject valid C++ code after
d999ce0302f06d250f6d496b56a
hokein wrote:
> Oh, we need to adjust
> https://github.com/root-project/root/blob/be5d34934de883270683030b3af2cd1195d17ea8/cmake/modules/RootMacros.cmake#L272
> to skip in case of C++...
The link points to an irrelevant project, I assume you mean here
https://github.com/llvm/llvm-project/blob
hokein wrote:
unfortunately, this seems to break an existing test:
```
OK ] InterpreterTest.IncrementalInputTopLevelDecls (66 ms)
[ RUN ] InterpreterTest.Errors
ClangReplInterpreterTests:
/usr/local/google/home/hokein/workspace/llvm-project/clang/lib/Sema/IdentifierResolver.cpp:228:
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/94471
___
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/94471
The incremental processing mode doesn't seem to work well for C++.
>From 8457c4aa1758d10188da5978d30d2d1ed505e01e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 5 Jun 2024 15:46:56 +0200
Subject: [PATCH]
hokein wrote:
> I want to somehow record this breakage in the form of a test for our future
> selves when decide to revisit this workaround-looking code.
This is the processed file
https://gist.github.com/hokein/e4a5881329c3956494afa2de7d350476.
> I am a bit overwhelmed right now, are you wi
hokein wrote:
> Out of curiosity, in what context you use -fincremental-extensions?
The code snippet I provided is extracted from our internal test. We have an
internal clang-tool (with the `incremental-extensions` on) to generate headers
https://github.com/llvm/llvm-project/pull/89804
__
hokein wrote:
Thanks for the prompt response. I think limiting it to C-only will fix the
issue (note that there is no `C` in `LangOpts`, you may want to use
`!getLangOpts().CPlusPlus` to exclude C++).
https://github.com/llvm/llvm-project/pull/89804
_
hokein wrote:
@vgvassilev
The reland d999ce0302f06d250f6d496b56a5a5f2dc331e61 makes the clang reject the
valid code now:
```
$ cat /tmp/t33.cpp
#include
#include
int main() {
}
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/86512
>From 3ce87797dbc36ae792b4d82077cd8f27f1eee53e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 25 Mar 2024 15:10:51 +0100
Subject: [PATCH] [clang] Implement a bitwise_copyable builtin type trait.
This patch
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/86512
>From 0eec9639530a137da6c4c4b2cc4249a3f9dd9939 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 25 Mar 2024 15:10:51 +0100
Subject: [PATCH] [clang] Implement a bitwise_copyable builtin type trait.
This patch
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/94349
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -12,7 +12,7 @@
// RUN: --sysroot=%S/Inputs/mips_mti_linux/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-BE-HF-32R2 %s
//
-// CHECK-BE-HF-32R2: "{{[^"]*}}clang{{[^"]*}}" {{.*}} "-triple"
"mips-mti-linux"
hokein wrote:
Thanks, I wasn't aware of th
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/94349
>From b9bd6c36196c7f1fdf6ec7a56260425e0b7255f7 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 4 Jun 2024 14:51:10 +0200
Subject: [PATCH] [Driver] Dont use absolute paths for invoking subcommands for
driver
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/94349
>From fa0880d477439e4af3f0b1b057dc1c66a2ccbc1e Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Tue, 4 Jun 2024 14:51:10 +0200
Subject: [PATCH] [Driver] Make the FileCheck less strict for some tests.
We see some t
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/94349
We see some tests are failing internally after
12949c952c4fbad776a860c003ccf176973278a0.
In CAS systems, we might not see the exact binary name (clang), this patch
removes the binary name in the FileCheck conten
https://github.com/hokein approved this pull request.
Thanks for the cleanup, this looks good to me.
https://github.com/llvm/llvm-project/pull/94311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
hokein wrote:
Add @eugenis as a reviewer, could you take a look on the sanitizer bit?
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:
> Could we rewrite the description and documentation to capture what the type
> trait is doing now? We have a lot of references to the
> `is_trivially_copyable`, which is almost fully irrelevant to the current
> implementation.
Thanks, I updated the PR description and documentat
@@ -4016,6 +4016,34 @@ Note that the `size` argument must be a compile time
constant.
Note that this intrinsic cannot yet be called in a ``constexpr`` context.
+``__is_bitwise_cloneable``
+--
+
+A type trait is used to check whether a type can be safe
@@ -2749,6 +2749,17 @@ bool QualType::isTriviallyCopyableType(const ASTContext
&Context) const {
/*IsCopyConstructible=*/false);
}
+bool QualType::isBitwiseCloneableType(const ASTContext & Context) const {
+ if (const auto *RD = getCanoni
@@ -1120,6 +1120,14 @@ class QualType {
/// Return true if this is a trivially copyable type (C++0x [basic.types]p9)
bool isTriviallyCopyableType(const ASTContext &Context) const;
+ /// Return true if the type is safe to bitwise copy by memcpy.
+ ///
+ /// This is an ex
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/86512
>From 011d6bbb434bdb46efe92891fe356885f82c4445 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 25 Mar 2024 15:10:51 +0100
Subject: [PATCH] ination of 2 commits.
[clang] Implement a bitwise_copyable builtin t
https://github.com/hokein edited 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
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/86512
>From 49747cde60dc8a1f4ed4ddcee020f71c88f35287 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 25 Mar 2024 15:10:51 +0100
Subject: [PATCH] [clang] Implement a bitwise_copyable builtin type trait.
This patch
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/93533
In the https://github.com/llvm/llvm-project/pull/90961 fix, we miss a case
where the undeduced template parameters of the underlying deduction guide are
not transformed, which leaves incorrect depth/index informa
hokein wrote:
The crash is already fixed by
https://github.com/llvm/llvm-project/commit/7a28a5b3fee6c78ad59af79a3d03c00db153c49f
https://github.com/llvm/llvm-project/pull/92721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/92721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11298,8 +11298,14 @@ static void DiagnoseBadConversion(Sema &S,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ? Fn->g
@@ -11298,8 +11298,14 @@ static void DiagnoseBadConversion(Sema &S,
OverloadCandidate *Cand,
Expr *FromExpr = Conv.Bad.FromExpr;
QualType FromTy = Conv.Bad.getFromType();
QualType ToTy = Conv.Bad.getToType();
- SourceRange ToParamRange =
- !isObjectArgument ? Fn->g
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/92721
>From e2dc2cecee5891b88ff4c2e473220cc9fd36df34 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Sun, 19 May 2024 22:47:14 +0200
Subject: [PATCH 1/2] [Sema] Fix an out-of-bounds crash when diagnosing bad
conversion
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/92721
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/92535
___
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/92721
None
>From 2aa2caf15282d28e9fda99d51776d842d3d57e95 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Sun, 19 May 2024 22:47:14 +0200
Subject: [PATCH] [Sema] Fix an out-of-bounds crash when diagnosing bad
conversi
https://github.com/hokein approved this pull request.
nit: add a note in `clang/docs/ReleaseNotes.rst`
https://github.com/llvm/llvm-project/pull/92654
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/92535
clang rejects some valid code (see testcases) because of an incorrect
transformed deduction guides. This patch fixes it.
We miss the template argument packs during the transformation (`auto
(type-parameter-0-0..
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
+
+// Scalar types are bitwise clonable.
+static_assert(__is_bitwise_cloneable(int));
+static_assert(__is_bitwise_cloneable(int*));
+// array
+static_assert(__is_bitwise_cloneable(int[10]));
+
+// non-scalar
hokein wrote:
Thanks @mizvekov for the quick fix.
https://github.com/llvm/llvm-project/pull/92389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/92389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -111,7 +111,7 @@ struct Foo {
template
using Bar = Foo; // expected-note {{candidate template ignored:
couldn't infer template argument 'X'}} \
// expected-note {{candidate template ignored:
constraints not satisfied [with X = int]}} \
-
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/92389
>From ada7f47eae6ef66a51cdeb91ab5aca0e188e5704 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 16 May 2024 14:05:57 +0200
Subject: [PATCH] [clang] CTAD alias: Emit a more descriptive diagnostic
message when
https://github.com/hokein created
https://github.com/llvm/llvm-project/pull/92389
Fixes https://github.com/llvm/llvm-project/issues/92225
>From 20294489121be7a68519280da8e144c2b9be398c Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Thu, 16 May 2024 14:05:57 +0200
Subject: [PATCH] [clang] CTAD
https://github.com/hokein closed 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/cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/91454
___
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/92266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -583,3 +583,8 @@ void NonADLCall3() {
f(x);
}
} // namespace test_adl_call_three
+
hokein wrote:
nit: wrap the code within `namespace GH35300 { ...}`.
https://github.com/llvm/llvm-project/pull/92266
___
cfe-com
https://github.com/hokein approved this pull request.
thanks, still good.
https://github.com/llvm/llvm-project/pull/92266
___
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/91454
>From e560fe2bf2d4bdc07a71682aa4d3a4bee8730b80 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Wed, 8 May 2024 12:11:10 +0200
Subject: [PATCH 1/2] [AST] RecursiveASTVisitor: Don't traverse the alias
deduction gui
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
+
+// Scalar types are bitwise clonable.
+static_assert(__is_bitwise_cloneable(int));
+static_assert(__is_bitwise_cloneable(int*));
+// array
+static_assert(__is_bitwise_cloneable(int[10]));
+
+// non-scalar
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
+
+// Scalar types are bitwise clonable.
+static_assert(__is_bitwise_cloneable(int));
+static_assert(__is_bitwise_cloneable(int*));
+// array
+static_assert(__is_bitwise_cloneable(int[10]));
+
+// non-scalar
@@ -2718,6 +2718,36 @@ bool QualType::isTriviallyCopyableType(const ASTContext
&Context) const {
/*IsCopyConstructible=*/false);
}
+bool QualType::isBitwiseCloneableType(const ASTContext & Context) const {
+ QualType CanonicalType = getCa
@@ -2718,6 +2718,36 @@ bool QualType::isTriviallyCopyableType(const ASTContext
&Context) const {
/*IsCopyConstructible=*/false);
}
+bool QualType::isBitwiseCloneableType(const ASTContext & Context) const {
+ QualType CanonicalType = getCa
https://github.com/hokein commented:
thanks for the 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
@@ -3958,6 +3958,50 @@ Note that the `size` argument must be a compile time
constant.
Note that this intrinsic cannot yet be called in a ``constexpr`` context.
+``__is_bitwise_cloneable``
+-
+
+A type trait is used to check whether a type can be safel
https://github.com/hokein edited 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
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/86512
>From 10d06e728d836f4aaad7dbf1a6b06b57e4092bb1 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Mon, 25 Mar 2024 15:10:51 +0100
Subject: [PATCH 1/3] [clang] Implement a bitwise_copyable builtin type trait.
This pa
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -ast-dump %s 2>&1 | FileCheck %s
hokein wrote:
For ast-dump lit tests, we usually place them in `clang/test/AST/` dir with
name `ast-dump*.cpp` (or we can add it to the existing `ast-dump-expr.cpp`).
https://github.com/llvm/
https://github.com/hokein approved this pull request.
thanks, this looks good to me, a small nit.
https://github.com/llvm/llvm-project/pull/92266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/92266
___
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 659cf5b5c1216ab9f6a8dbb63b4f93de41cd173d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/2] [clang] CTAD: implement the missing IsDeducible
constraint for a
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 659cf5b5c1216ab9f6a8dbb63b4f93de41cd173d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/2] [clang] CTAD: implement the missing IsDeducible
constraint for a
https://github.com/hokein edited 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/cfe-commits
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 659cf5b5c1216ab9f6a8dbb63b4f93de41cd173d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/2] [clang] CTAD: implement the missing IsDeducible
constraint for a
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 659cf5b5c1216ab9f6a8dbb63b4f93de41cd173d Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/2] [clang] CTAD: implement the missing IsDeducible
constraint for a
@@ -2774,6 +2775,41 @@ Expr *transformRequireClause(Sema &SemaRef,
FunctionTemplateDecl *FTD,
return E.getAs();
}
+// Build the associated constraints for the alias deduction guides.
+// C++ [over.match.class.deduct]p3.3:
+// The associated constraints ([temp.constr.decl]
hokein wrote:
Thanks for the review.
> I'll approve that modulo nit but i think we want
>
> * An issue to keep track of the duplication in
> `FinishTemplateArgumentDeduction`
Filed #92224.
> * A follow up PR to improve diagnostics
Filed #92225, and assigned to myself. Will do it.
> Thanks!
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 20947c1a34fae3593a98dba125e5d70d652c7190 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH 1/2] [clang] CTAD: implement the missing IsDeducible
constraint for a
https://github.com/hokein approved this pull request.
Thanks!
https://github.com/llvm/llvm-project/pull/92104
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2774,6 +2775,41 @@ Expr *transformRequireClause(Sema &SemaRef,
FunctionTemplateDecl *FTD,
return E.getAs();
}
+// Build the associated constraints for the alias deduction guides.
+// C++ [over.match.class.deduct]p3.3:
+// The associated constraints ([temp.constr.decl]
@@ -6116,6 +6116,17 @@ static bool EvaluateBinaryTypeTrait(Sema &Self,
TypeTrait BTT, const TypeSourceI
tok::kw___is_pointer_interconvertible_base_of);
return Self.IsPointerInterconvertibleBaseOf(Lhs, Rhs);
+ }
+ case BTT_IsDeducible: {
+
@@ -27,7 +27,8 @@ enum TypeTrait {
,
#define TYPE_TRAIT_2(Spelling, Name, Key) BTT_##Name,
#include "clang/Basic/TokenKinds.def"
- BTT_Last = UTT_Last // BTT_Last == last BTT_XX in the enum.
+ BTT_Last = UTT_Last
hokein wrote:
Reverted the change.
https:/
@@ -18,6 +18,7 @@
#include "clang/AST/ExprCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/TemplateName.h"
+#include "clang/AST/Type.h"
hokein wrote:
Done.
https://github.com/llvm/llvm-project/pull/89358
__
@@ -190,13 +196,15 @@ template struct Foo { Foo(T); };
template using AFoo = Foo;
template concept False = false;
-template using BFoo = AFoo;
+template
+using BFoo = AFoo; // expected-note {{candidate template ignored:
constraints not satisfied [with V = int]}} \
+
https://github.com/hokein updated
https://github.com/llvm/llvm-project/pull/89358
>From 20947c1a34fae3593a98dba125e5d70d652c7190 Mon Sep 17 00:00:00 2001
From: Haojian Wu
Date: Fri, 19 Apr 2024 10:54:12 +0200
Subject: [PATCH] [clang] CTAD: implement the missing IsDeducible constraint
for alias
301 - 400 of 1685 matches
Mail list logo