AaronBallman wrote:
> However, we should target to have it landed before rc2 or something like that
> We'd make a lot of folks happy having that in 20, I think. And while the PR
> is not tiny, it's seems also fairly low risk (famous last words!)
I'm not comfortable pushing large, new features
erichkeane wrote:
> The code and test coverage looks good. There are a couple of comments that
> have not been addressed.
>
> And there is @zygoloid suggestion to generalize
> `SubstNonTypeTemplateParmPackExpr` - do we want to do that now or address it
> after the fact?
>
> Maybe trying to l
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building
`clang` at step 7 "Add check check-offload".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/30/builds/14879
Here is the releva
https://github.com/cor3ntin closed
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
cor3ntin wrote:
> > Does this mean we should adjust the cxx_status page to not say Clang 20? I
> > also see there is a conflict with the ReleaseNotes.md where it appears all
> > of the C++2c items no longer exist. (I guess that is because it is for the
> > next release.)
>
> Meh, let's assume
ricejasonf wrote:
>@ricejasonf let us know if you want us to merge on your behalf
@cor3ntin When you think its ready, yes please. I think it requires write
access. I fixed the conflict in the ReleaseNotes through Github's UI so that
only my feature is under the C++2c features added. I assume o
cor3ntin wrote:
> Does this mean we should adjust the cxx_status page to not say Clang 20? I
> also see there is a conflict with the ReleaseNotes.md where it appears all of
> the C++2c items no longer exist. (I guess that is because it is for the next
> release.)
Meh, let's assume 20 and we c
ricejasonf wrote:
@cor3ntin
> Now that the Clang 20 branch has happened, I think we should go ahead with
> that PR
Does this mean we should adjust the cxx_status page to not say Clang 20? I also
see there is a conflict with the ReleaseNotes.md where it appears all of the
C++2c items no long
cor3ntin wrote:
@ricejasonf let us know if you want us to merge on your behalf
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin approved this pull request.
Now that the Clang 20 branch has happened, I think we should go ahead with that
PR
- It would be great to explore merging ResolvedUnexpandedPackExpr and
FunctionParmPackExpr in a separate PR. Is that something you would be
interested in
@@ -4213,8 +4226,35 @@ class DecompositionDecl final
static DecompositionDecl *CreateDeserialized(ASTContext &C, GlobalDeclID ID,
unsigned NumBindings);
- ArrayRef bindings() const {
-return llvm::ArrayRef(getTrailingObject
https://github.com/cor3ntin commented:
The code and test coverage looks good.
There are a couple of comments that have not been addressed.
And there is @zygoloid suggestion to generalize
`SubstNonTypeTemplateParmPackExpr`.
Maybe trying to land that today is not the brightest idea.
However, we
@@ -5321,6 +5321,59 @@ class BuiltinBitCastExpr final
}
};
+// Represents an unexpanded pack where the list of expressions are
+// known. These are used when structured bindings introduce a pack.
+class ResolvedUnexpandedPackExpr final
cor3ntin wrote:
Shoul
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1099,6 +1099,13 @@ def err_lambda_capture_misplaced_ellipsis : Error<
"the name of the capture">;
def err_lambda_capture_multiple_ellipses : Error<
"multiple ellipses in pack capture">;
+def err_binding_multiple_ellipses : Error<
+ "multiple packs in structured binding
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1523,9 +1570,25 @@ void
Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) {
// If the type of the decomposition is dependent, then so is the type of
// each binding.
if (DecompType->isDependentType()) {
-for (auto *B : DD->bindings())
- B->s
@@ -3423,6 +3425,13 @@ VarDecl *BindingDecl::getHoldingVar() const {
return VD;
}
+llvm::ArrayRef BindingDecl::getBindingPackExprs() const {
+ if (!Binding)
+return {};
ricejasonf wrote:
Added. The assert was being triggered in one spot that I realized
https://github.com/ricejasonf edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1523,9 +1570,25 @@ void
Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) {
// If the type of the decomposition is dependent, then so is the type of
// each binding.
if (DecompType->isDependentType()) {
-for (auto *B : DD->bindings())
- B->s
@@ -1523,9 +1570,25 @@ void
Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) {
// If the type of the decomposition is dependent, then so is the type of
// each binding.
if (DecompType->isDependentType()) {
-for (auto *B : DD->bindings())
- B->s
@@ -3423,6 +3425,13 @@ VarDecl *BindingDecl::getHoldingVar() const {
return VD;
}
+llvm::ArrayRef BindingDecl::getBindingPackExprs() const {
+ if (!Binding)
+return {};
cor3ntin wrote:
Looking at how this is used, i think we can assert here instead
ht
@@ -2484,6 +2489,16 @@ TemplateInstantiator::TransformDeclRefExpr(DeclRefExpr
*E) {
if (PD->isParameterPack())
return TransformFunctionParmPackRefExpr(E, PD);
+ if (BindingDecl *BD = dyn_cast(D); BD && BD->isParameterPack())
{
+BD = cast_or_null(TransformDecl(
@@ -2670,8 +2670,11 @@ StmtResult Sema::BuildCXXForRangeStmt(
// them in properly when we instantiate the loop.
if (!LoopVar->isInvalidDecl() && Kind != BFRK_Check) {
if (auto *DD = dyn_cast(LoopVar))
-for (auto *Binding : DD->bindings())
- Bindin
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cor3ntin commented:
Some nitpicks. Getting close :)
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,117 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++26 %s -verify
ricejasonf wrote:
I added these to the bottom of this file.
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-co
https://github.com/shafik edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/shafik commented:
Thank you for the PR, small comments.
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -std=c++2c -verify -fsyntax-only %s
+
+template
+void decompose_array() {
+ int arr[4] = {1, 2, 3, 5};
+ auto [x, ... // #1
+rest, ...more_rest] = arr; // expected-error{{multiple packs in structured
binding declaration}}
+
@@ -0,0 +1,117 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++26 %s -verify
shafik wrote:
+1 we should always cover all the examples from the proposal.
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mai
@@ -4213,8 +4226,35 @@ class DecompositionDecl final
static DecompositionDecl *CreateDeserialized(ASTContext &C, GlobalDeclID ID,
unsigned NumBindings);
- ArrayRef bindings() const {
-return llvm::ArrayRef(getTrailingObject
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
zygoloid wrote:
We [don't start function comments with the function
name](https://llvm.org/docs/CodingStandards.html#commenting:~:text=
cor3ntin wrote:
> I do not have a strong preference, but I kept `bindings()` the same since it
> represents the structure of the AST and that is how it is used in most
> places. (like 2x time more than `flat_bindings()`)
Lets not then
I'm inclined to say we should merge that once @zygoloid an
ricejasonf wrote:
> I wonder if we should rename flat_bindings() to bindings() and bindings() to
> bindings_as_written() (or similar), as I expect that to be the function we
> ~always want to use.
I do not have a strong preference, but I kept `bindings()` the same since it
represents the stru
@@ -5321,6 +5321,59 @@ class BuiltinBitCastExpr final
}
};
+// Represents an unexpanded pack where the list of expressions are
+// known. These are used when structured bindings introduce a pack.
+class ResolvedUnexpandedPackExpr final
+: public Expr,
+ private llvm
@@ -5321,6 +5321,59 @@ class BuiltinBitCastExpr final
}
};
+// Represents an unexpanded pack where the list of expressions are
+// known. These are used when structured bindings introduce a pack.
+class ResolvedUnexpandedPackExpr final
+: public Expr,
+ private llvm
@@ -5321,6 +5321,59 @@ class BuiltinBitCastExpr final
}
};
+// Represents an unexpanded pack where the list of expressions are
+// known. These are used when structured bindings introduce a pack.
+class ResolvedUnexpandedPackExpr final
+: public Expr,
+ private llvm
@@ -5321,6 +5321,59 @@ class BuiltinBitCastExpr final
}
};
+// Represents an unexpanded pack where the list of expressions are
+// known. These are used when structured bindings introduce a pack.
+class ResolvedUnexpandedPackExpr final
+: public Expr,
+ private llvm
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1099,6 +1099,13 @@ def err_lambda_capture_misplaced_ellipsis : Error<
"the name of the capture">;
def err_lambda_capture_multiple_ellipses : Error<
"multiple ellipses in pack capture">;
+def err_binding_multiple_ellipses : Error<
+ "multiple packs in structured binding
@@ -1099,6 +1099,13 @@ def err_lambda_capture_misplaced_ellipsis : Error<
"the name of the capture">;
def err_lambda_capture_multiple_ellipses : Error<
"multiple ellipses in pack capture">;
+def err_binding_multiple_ellipses : Error<
+ "multiple packs in structured binding
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
@@ -1099,6 +1099,13 @@ def err_lambda_capture_misplaced_ellipsis : Error<
"the name of the capture">;
def err_lambda_capture_multiple_ellipses : Error<
"multiple ellipses in pack capture">;
+def err_binding_multiple_ellipses : Error<
+ "multiple packs in structured binding
https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,117 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++26 %s -verify
cor3ntin wrote:
Can we
- Test that `sizeof` (in the case where it's empty, of size 1, n, etc_) works
fine
- Test that `auto [a, b...]` works for an array of size 1
- Test that `auto [
https://github.com/cor3ntin commented:
A few more comments on top of Richard's
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
@@ -757,23 +775,40 @@ bool Sema::CheckParameterPacksForExpansion(
bool HaveFirstPack = false;
std::optional NumPartialExpansions;
SourceLocation PartiallySubstitutedPackLoc;
+ typedef LocalInstantiationScope::DeclArgumentPack DeclArgumentPack;
for (UnexpandedParamet
@@ -15991,6 +15998,24 @@
TreeTransform::TransformFunctionParmPackExpr(FunctionParmPackExpr *E) {
return E;
}
+template
+ExprResult TreeTransform::TransformResolvedUnexpandedPackExpr(
+ResolvedUnexpandedPackExpr *E) {
+ bool ArgumentChanged = false;
+ SmallVector NewE
@@ -15991,6 +15998,24 @@
TreeTransform::TransformFunctionParmPackExpr(FunctionParmPackExpr *E) {
return E;
}
+template
+ExprResult TreeTransform::TransformResolvedUnexpandedPackExpr(
+ResolvedUnexpandedPackExpr *E) {
+ bool ArgumentChanged = false;
+ SmallVector NewE
https://github.com/ricejasonf edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ricejasonf edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ricejasonf edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
@@ -5321,6 +5321,59 @@ class BuiltinBitCastExpr final
}
};
+// Represents an unexpanded pack where the list of expressions are
+// known. These are used when structured bindings introduce a pack.
+class ResolvedUnexpandedPackExpr final
ricejasonf wrote:
I d
@@ -951,28 +959,124 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+static bool CheckBindingsCount(Sema &S, D
@@ -1099,6 +1099,13 @@ def err_lambda_capture_misplaced_ellipsis : Error<
"the name of the capture">;
def err_lambda_capture_multiple_ellipses : Error<
"multiple ellipses in pack capture">;
+def err_binding_multiple_ellipses : Error<
+ "multiple ellipses in structured bind
@@ -5321,6 +5321,59 @@ class BuiltinBitCastExpr final
}
};
+// Represents an unexpanded pack where the list of expressions are
+// known. These are used when structured bindings introduce a pack.
+class ResolvedUnexpandedPackExpr final
zygoloid wrote:
This
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 6e8a1a45a783c13e4cd19bfd20b7a56cab6f7d81
e0cb7487cec4d9eb3aac4806d99cea2120f6974a --e
@@ -757,23 +775,40 @@ bool Sema::CheckParameterPacksForExpansion(
bool HaveFirstPack = false;
std::optional NumPartialExpansions;
SourceLocation PartiallySubstitutedPackLoc;
+ typedef LocalInstantiationScope::DeclArgumentPack DeclArgumentPack;
for (UnexpandedParamet
@@ -15991,6 +15998,24 @@
TreeTransform::TransformFunctionParmPackExpr(FunctionParmPackExpr *E) {
return E;
}
+template
+ExprResult TreeTransform::TransformResolvedUnexpandedPackExpr(
+ResolvedUnexpandedPackExpr *E) {
+ bool ArgumentChanged = false;
+ SmallVector NewE
@@ -50,17 +50,29 @@ class CollectUnexpandedParameterPacksVisitor
auto *FTD = FD ? FD->getDescribedFunctionTemplate() : nullptr;
if (FTD && FTD->getTemplateParameters()->getDepth() >= DepthLimit)
return;
- } else if (getDepthAndIndex(ND).first >= D
@@ -1166,26 +1166,54 @@
TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D) {
Decl *TemplateDeclInstantiator::VisitBindingDecl(BindingDecl *D) {
auto *NewBD = BindingDecl::Create(SemaRef.Context, Owner, D->getLocation(),
-
@@ -1166,26 +1166,54 @@
TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D) {
Decl *TemplateDeclInstantiator::VisitBindingDecl(BindingDecl *D) {
auto *NewBD = BindingDecl::Create(SemaRef.Context, Owner, D->getLocation(),
-
@@ -757,23 +775,40 @@ bool Sema::CheckParameterPacksForExpansion(
bool HaveFirstPack = false;
std::optional NumPartialExpansions;
SourceLocation PartiallySubstitutedPackLoc;
+ typedef LocalInstantiationScope::DeclArgumentPack DeclArgumentPack;
for (UnexpandedParamet
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1508,23 +1612,52 @@ static bool checkMemberDecomposition(Sema &S,
ArrayRef Bindings,
Qualifiers Q = DecompType.getQualifiers();
if (FD->isMutable())
Q.removeConst();
-B->setBinding(S.BuildQualifiedType(FD->getType(), Loc, Q), E.get());
+Walker.commitA
@@ -1166,26 +1166,54 @@
TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D) {
Decl *TemplateDeclInstantiator::VisitBindingDecl(BindingDecl *D) {
auto *NewBD = BindingDecl::Create(SemaRef.Context, Owner, D->getLocation(),
-
https://github.com/zyn0217 commented:
Thanks, this looks much better now. I went through another pass, focusing
mostly on the pack expansion part.
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -50,17 +50,29 @@ class CollectUnexpandedParameterPacksVisitor
auto *FTD = FD ? FD->getDescribedFunctionTemplate() : nullptr;
if (FTD && FTD->getTemplateParameters()->getDepth() >= DepthLimit)
return;
- } else if (getDepthAndIndex(ND).first >= D
@@ -1166,26 +1166,54 @@
TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D) {
Decl *TemplateDeclInstantiator::VisitBindingDecl(BindingDecl *D) {
auto *NewBD = BindingDecl::Create(SemaRef.Context, Owner, D->getLocation(),
-
@@ -15991,6 +15998,24 @@
TreeTransform::TransformFunctionParmPackExpr(FunctionParmPackExpr *E) {
return E;
}
+template
+ExprResult TreeTransform::TransformResolvedUnexpandedPackExpr(
+ResolvedUnexpandedPackExpr *E) {
+ bool ArgumentChanged = false;
+ SmallVector NewE
@@ -757,23 +775,40 @@ bool Sema::CheckParameterPacksForExpansion(
bool HaveFirstPack = false;
std::optional NumPartialExpansions;
SourceLocation PartiallySubstitutedPackLoc;
+ typedef LocalInstantiationScope::DeclArgumentPack DeclArgumentPack;
zyn0217 wr
@@ -951,28 +959,125 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator
&D,
return New;
}
+// CheckBindingsCount
+// - Checks the arity of the structured bindings
+// - Creates the resolved pack expr if there is
+//one
+
zyn0217 wrote:
```sugg
@@ -1166,26 +1166,54 @@
TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D) {
Decl *TemplateDeclInstantiator::VisitBindingDecl(BindingDecl *D) {
auto *NewBD = BindingDecl::Create(SemaRef.Context, Owner, D->getLocation(),
-
@@ -1508,23 +1612,52 @@ static bool checkMemberDecomposition(Sema &S,
ArrayRef Bindings,
Qualifiers Q = DecompType.getQualifiers();
if (FD->isMutable())
Q.removeConst();
-B->setBinding(S.BuildQualifiedType(FD->getType(), Loc, Q), E.get());
+Walker.commitA
@@ -104,7 +104,6 @@ void CodeGenFunction::EmitDecl(const Decl &D) {
case Decl::Binding:
case Decl::UnresolvedUsingIfExists:
case Decl::HLSLBuffer:
-llvm_unreachable("Declaration should not be in declstmts!");
ricejasonf wrote:
I will just put this ba
@@ -237,7 +237,7 @@ bool Decl::isTemplateParameterPack() const {
}
bool Decl::isParameterPack() const {
- if (const auto *Var = dyn_cast(this))
+ if (const auto *Var = dyn_cast(this))
ricejasonf wrote:
They would still both just look for a PackExpansionType
cor3ntin wrote:
I plan to do another pass in the next couple of days, sorry for the delay
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -237,7 +237,7 @@ bool Decl::isTemplateParameterPack() const {
}
bool Decl::isParameterPack() const {
- if (const auto *Var = dyn_cast(this))
+ if (const auto *Var = dyn_cast(this))
zwuis wrote:
My idea about this part of changes is adding `BindingDecl::i
https://github.com/zwuis commented:
FYI Clang Static Analyzer (I built this branch locally) crashes when running
with 'clang/test/SemaCXX/cxx2c-binding-pack.cpp'. My test command is
`path/to/build/bin/clang-tidy --checks=clang-static-analyzer-core.BitwiseShift
another/path/to/SemaCXX/cxx2c-bin
@@ -104,7 +104,6 @@ void CodeGenFunction::EmitDecl(const Decl &D) {
case Decl::Binding:
case Decl::UnresolvedUsingIfExists:
case Decl::HLSLBuffer:
-llvm_unreachable("Declaration should not be in declstmts!");
zwuis wrote:
Can we move some `case`s aft
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ricejasonf wrote:
@erichkeane, thanks for the approval. Does that mean I should stop making
changes to this PR? I was messing with a more rangey interface for
`flat_bindings`, but for some reason the `llvm::concat` range was referring to
uninitialized memory when used as a temporary in a for l
https://github.com/erichkeane approved this pull request.
I'm good here. Please let others make sure they are as well though.
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
@@ -1965,3 +1965,52 @@ CXXFoldExpr::CXXFoldExpr(QualType T,
UnresolvedLookupExpr *Callee,
SubExprs[SubExpr::RHS] = RHS;
setDependence(computeDependence(this));
}
+
+ResolvedUnexpandedPackExpr::ResolvedUnexpandedPackExpr(SourceLocation BL,
+
https://github.com/ricejasonf edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1965,3 +1965,52 @@ CXXFoldExpr::CXXFoldExpr(QualType T,
UnresolvedLookupExpr *Callee,
SubExprs[SubExpr::RHS] = RHS;
setDependence(computeDependence(this));
}
+
+ResolvedUnexpandedPackExpr::ResolvedUnexpandedPackExpr(SourceLocation BL,
+
https://github.com/ricejasonf edited
https://github.com/llvm/llvm-project/pull/121417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 180 matches
Mail list logo