@@ -16487,12 +16501,22 @@ ExprResult
TreeTransform::TransformCXXParenListInitExpr(CXXParenListInitExpr *E)
{
SmallVector TransformedInits;
ArrayRef InitExprs = E->getInitExprs();
- if (TransformExprs(InitExprs.data(), InitExprs.size(), true,
- Transfor
@@ -142,6 +142,14 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(
SkipUntil(tok::semi);
}
+if (FunctionDecl *FD =
+dyn_cast_if_present(FnD->getPreviousDecl())) {
+ if (isa(FD->getLexicalDeclContext()) ||
+ Actions.getDefaultedFunctionKind
@@ -142,6 +142,14 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(
SkipUntil(tok::semi);
}
+if (FunctionDecl *FD =
+dyn_cast_if_present(FnD->getPreviousDecl())) {
+ if (isa(FD->getLexicalDeclContext()) ||
+ Actions.getDefaultedFunctionKind
https://github.com/zyn0217 requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/136717
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/122423
>From 56bacf47c53aca276ae4fa6aa2972b7eda152ddd Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 10 Jan 2025 09:46:24 +0800
Subject: [PATCH 01/10] Reapply "[Clang] Implement CWG2369 "Ordering between
const
@@ -8058,6 +8061,46 @@ bool Sema::CheckNonDependentConversions(
}
}
+ // A speculative workaround for self-dependent constraint bugs that manifest
+ // after CWG2369.
+ // FIXME: Add references to the standard once P3606 is adopted.
+ auto MaybeInvolveUserDefinedConv
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/134038
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/134807
>From 3f09d114d6c4c51bd879a19caaf1c73c531cfedd Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 8 Apr 2025 16:16:53 +0800
Subject: [PATCH 1/2] [Clang] Handle default template arguments for alias CTAD
guid
https://github.com/zyn0217 approved this pull request.
Yes, would be great to see it get backported
https://github.com/llvm/llvm-project/pull/135757
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/134807
>From 3f09d114d6c4c51bd879a19caaf1c73c531cfedd Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 8 Apr 2025 16:16:53 +0800
Subject: [PATCH 1/3] [Clang] Handle default template arguments for alias CTAD
guid
@@ -4368,15 +4385,63 @@ Sema::CheckVarTemplateId(VarTemplateDecl *Template,
SourceLocation TemplateLoc,
// Produce a placeholder value if the specialization is dependent.
if (Template->getDeclContext()->isDependentContext() ||
TemplateSpecializationType::anyDependent
@@ -7594,6 +7594,54 @@ ASTContext::getCanonicalTemplateArgument(const
TemplateArgument &Arg) const {
llvm_unreachable("Unhandled template argument kind");
}
+bool ASTContext::isSameTemplateArgument(const TemplateArgument &Arg1,
+const
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/138377
In consteval calls rewriting, we expect an instantiated AST to remain
untouched. However, this was not true when rebuilding a MemberExpr in
TreeTransform, as it relies on FoundDecl to build a resolved member ca
@@ -360,6 +360,13 @@ class Sema;
LLVM_PREFERRED_TYPE(bool)
unsigned ObjCLifetimeConversionBinding : 1;
+/// Whether the source expression was originally a single element
+/// braced-init-list. Such a conversion is not a perfect match,
+/// as we prefer a st
@@ -412,6 +419,12 @@ class Sema;
bool isPerfect(const ASTContext &C) const {
if (!isIdentityConversion())
return false;
+
+ // We might prefer a std::initializer constructor,
zyn0217 wrote:
`std::initializer_list`
https://github.com/llv
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/138377
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 approved this pull request.
https://github.com/llvm/llvm-project/pull/136077
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4745,7 +4760,10 @@ Sema::CreateUnaryExprOrTypeTraitExpr(Expr *E,
SourceLocation OpLoc,
// C99 6.5.3.4p4: the type (an unsigned integer type) is size_t.
return new (Context) UnaryExprOrTypeTraitExpr(
- ExprKind, E, Context.getSizeType(), OpLoc, E->getSourceRange()
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/122423
>From 56bacf47c53aca276ae4fa6aa2972b7eda152ddd Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 10 Jan 2025 09:46:24 +0800
Subject: [PATCH 01/12] Reapply "[Clang] Implement CWG2369 "Ordering between
const
@@ -2455,6 +2455,11 @@ bool isIncludeFile(llvm::StringRef Line) {
}
bool allowImplicitCompletion(llvm::StringRef Content, unsigned Offset) {
+ // Check if we're inside an empty template argument list
+ if (Content.size() > 2 && Content[Offset - 1] == '<' &&
+ Content[Of
@@ -76,9 +77,18 @@ enum class TemplateSubstitutionKind : char {
class MultiLevelTemplateArgumentList {
/// The template argument list at a certain template depth
+enum ListProperties {
+ /// A 'Final' substitution means that Subst* nodes won't be built
+ //
https://github.com/zyn0217 commented:
Thanks for working on it. Will take a closer look later
https://github.com/llvm/llvm-project/pull/139057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/139057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2060,14 +2064,17 @@ TemplateName
TemplateInstantiator::TransformTemplateName(
return Arg.getAsTemplate();
}
- auto [AssociatedDecl, Final] =
+ auto [AssociatedDecl, Final, ArgumentsAreInjectedTemplateParams] =
TemplateArgs.getAssociatedD
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/139057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6884,7 +6884,7 @@
TreeTransform::TransformPackIndexingType(TypeLocBuilder &TLB,
assert(!Unexpanded.empty() && "Pack expansion without parameter packs?");
// Determine whether the set of unexpanded parameter packs can and should
// be expanded.
-bool ShouldE
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/139066
>From a6ee1af04225063bab4d853611c7a57b1db37aa9 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Thu, 8 May 2025 19:42:51 +0800
Subject: [PATCH] [Clang] Do not eat SFINAE diagnostics for explicit template
argum
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/139066
Instead of merely suggesting the template arguments are invalid, we now provide
an explanation of why the explicit template argument is invalid, following the
last diagnostic note.
For example,
```cpp
templat
https://github.com/zyn0217 commented:
I think this LGTM in general, but please wait for some time in case @erichkeane
@mizvekov have some ideas
https://github.com/llvm/llvm-project/pull/139057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/127773
Closes https://github.com/llvm/llvm-project/issues/122523
>From 2d9c248c70b6d24f277982a32f36e2ef1bde2829 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Feb 2025 17:13:56 +0800
Subject: [PATCH] [Clang
zyn0217 wrote:
I looked into that weeks ago, and the reason I remembered was kind of subtle.
I'll explain why the fix is necessary later - I'll need a debugger to help me
recall that.
https://github.com/llvm/llvm-project/pull/126723
___
cfe-commits m
zyn0217 wrote:
Ping
https://github.com/llvm/llvm-project/pull/126723
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
@mizvekov
The nuance is right here, where we tackle local lambdas and member functions
separately:
https://github.com/llvm/llvm-project/blob/404f94ac7d8c368fba8ad1f97512c26efd5ec965/clang/lib/Sema/SemaExpr.cpp#L18273-L18282
```cpp
template constexpr int visit(F f) { return f(0)
https://github.com/zyn0217 commented:
Thanks for the contribution, and this makes sense to me. However I'd like
others to take a look too.
Of course this should come with a release note, in
`clang/docs/ReleaseNotes.rst`.
https://github.com/llvm/llvm-project/pull/129198
__
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/129198
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -12796,6 +12803,7 @@ namespace {
}
void VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
+ isInCXXOperatorCall = true;
zyn0217 wrote:
You can use `llvm::SaveAndRestore` to avoid restoring it manually
https://github.com/llvm/llvm-project/pul
@@ -12804,6 +12812,20 @@ namespace {
Visit(Callee);
for (auto Arg: E->arguments())
HandleValue(Arg->IgnoreParenImpCasts());
+ isInCXXOperatorCall = false;
+}
+
+void VisitLambdaExpr(LambdaExpr *E) {
+ if (isInCXXOperatorCall) {
@@ -12597,6 +12597,12 @@ namespace {
bool isRecordType;
bool isPODType;
bool isReferenceType;
+// Tracks whether the current expression is being visited within a
+// CXXOperatorCallExpr. This flag is set to true when entering a
+// CXXOperatorCallExpr an
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130228
>From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 7 Mar 2025 11:38:11 +0800
Subject: [PATCH] [Clang] Implement P0963R3 "Structured binding declaration as
a co
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/130228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6749,6 +6749,55 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope
*S, Decl *D) {
CodeCompleteExpression(S, Data);
}
+void SemaCodeCompletion::CodeCompleteIfConst(Scope *S,
+ bool AfterExclaim) const {
+ ResultBuilder
@@ -6749,6 +6749,21 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope
*S, Decl *D) {
CodeCompleteExpression(S, Data);
}
+void SemaCodeCompletion::CodeCompleteIfConstExpr(Scope *S) const {
+ ResultBuilder Results(SemaRef, CodeCompleter->getAllocator(),
+
@@ -6749,6 +6749,55 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope
*S, Decl *D) {
CodeCompleteExpression(S, Data);
}
+void SemaCodeCompletion::CodeCompleteIfConst(Scope *S,
+ bool AfterExclaim) const {
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/129198
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 approved this pull request.
https://github.com/llvm/llvm-project/pull/123667
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase {
/// The context in which we are checking a template parameter list.
enum TemplateParamListContext {
-TPC_ClassTemplate,
-TPC_VarTemplate,
+// For this context, Class, Variable, TypeAlias, and non-pa
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase {
/// The context in which we are checking a template parameter list.
enum TemplateParamListContext {
-TPC_ClassTemplate,
-TPC_VarTemplate,
+// For this context, Class, Variable, TypeAlias, and non-pa
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130228
>From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 7 Mar 2025 11:38:11 +0800
Subject: [PATCH 1/3] [Clang] Implement P0963R3 "Structured binding declaration
as
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase {
/// The context in which we are checking a template parameter list.
enum TemplateParamListContext {
-TPC_ClassTemplate,
-TPC_VarTemplate,
+// For this context, Class, Variable, TypeAlias, and non-pa
@@ -309,6 +309,7 @@ Bug Fixes to AST Handling
^
- Fixed type checking when a statement expression ends in an l-value of atomic
type. (#GH106576)
- Fixed uninitialized use check in a lambda within CXXOperatorCallExpr.
(#GH129198)
+- Clang now correctly
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130228
>From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 7 Mar 2025 11:38:11 +0800
Subject: [PATCH 1/2] [Clang] Implement P0963R3 "Structured binding declaration
as
@@ -4285,6 +4290,8 @@ class DecompositionDecl final
std::move(Bindings));
}
+ bool isDecisionVariable() const { return IsDecisionVariable; }
zyn0217 wrote:
Done, I was referring to https://eel.is/c++draft/dcl.str
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/130228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/126723
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
@cor3ntin I would appreciate it if you can take a look too
https://github.com/llvm/llvm-project/pull/130725
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 approved this pull request.
https://github.com/llvm/llvm-project/pull/130725
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 ready_for_review
https://github.com/llvm/llvm-project/pull/130228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/130228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/130228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5218,16 +5218,28 @@ static bool EvaluateVarDecl(EvalInfo &Info, const
VarDecl *VD) {
return true;
}
+static bool EvaluateDecompositionDeclInit(EvalInfo &Info,
+ const DecompositionDecl *DD);
+
static bool EvaluateDecl(EvalInfo &
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130228
>From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 7 Mar 2025 11:38:11 +0800
Subject: [PATCH 1/4] [Clang] Implement P0963R3 "Structured binding declaration
as
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/130228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130228
>From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 7 Mar 2025 11:38:11 +0800
Subject: [PATCH 1/5] [Clang] Implement P0963R3 "Structured binding declaration
as
@@ -4224,15 +4224,18 @@ class DecompositionDecl final
: public VarDecl,
private llvm::TrailingObjects {
/// The number of BindingDecl*s following this object.
- unsigned NumBindings;
+ unsigned NumBindings : 31;
+
+ LLVM_PREFERRED_TYPE(bool)
+ unsigned IsDecisio
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130228
>From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 7 Mar 2025 11:38:11 +0800
Subject: [PATCH 1/8] [Clang] Implement P0963R3 "Structured binding declaration
as
zyn0217 wrote:
> Hum, do we want to add tests for
> https://cplusplus.github.io/CWG/issues/2867.html at the same time?
I'll look into that in a followup
https://github.com/llvm/llvm-project/pull/130228
___
cfe-commits mailing list
cfe-commits@lists.l
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130731
>From c643ba2de0bb3e5fcb6514b70c86e594badc396b Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 11 Mar 2025 14:18:20 +0800
Subject: [PATCH 1/2] [Clang] Fix the printout of CXXParenListInitExpr
involving d
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130731
>From c643ba2de0bb3e5fcb6514b70c86e594badc396b Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 11 Mar 2025 14:18:20 +0800
Subject: [PATCH] [Clang] Fix the printout of CXXParenListInitExpr involving
defau
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130731
>From c643ba2de0bb3e5fcb6514b70c86e594badc396b Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 11 Mar 2025 14:18:20 +0800
Subject: [PATCH 1/3] [Clang] Fix the printout of CXXParenListInitExpr
involving d
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/130731
The parantheses are unnecessary IMO because they should have been handled in
the parents of such expressions, e.g. in CXXFunctionalCastExpr.
Moreover, we shouldn't join CXXDefaultInitExpr either because they ar
zyn0217 wrote:
> The CI failure seems relevant here
Not a big deal.
https://github.com/llvm/llvm-project/pull/130731
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -529,8 +529,12 @@ def warn_cxx14_compat_decomp_decl : Warning<
def ext_decomp_decl : ExtWarn<
"decomposition declarations are a C++17 extension">, InGroup;
def ext_decomp_decl_cond : ExtWarn<
- "ISO C++17 does not permit structured binding declaration in a condition">,
-
@@ -5218,16 +5218,28 @@ static bool EvaluateVarDecl(EvalInfo &Info, const
VarDecl *VD) {
return true;
}
+static bool EvaluateDecompositionDeclInit(EvalInfo &Info,
+ const DecompositionDecl *DD);
+
static bool EvaluateDecl(EvalInfo &
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130228
>From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 7 Mar 2025 11:38:11 +0800
Subject: [PATCH 1/9] [Clang] Implement P0963R3 "Structured binding declaration
as
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/130228
>From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 7 Mar 2025 11:38:11 +0800
Subject: [PATCH 01/10] [Clang] Implement P0963R3 "Structured binding
declaration a
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/130228
Todo:
- [ ] Adapt the bytecode interpreter to the new evaluation model
- [ ] Tests for CG & Constant evaluation
- [ ] Release notes
With this patch, the example shown in https://godbolt.org/z/b64x65716 (the R
@@ -140,18 +140,23 @@ namespace Template {
template auto [a, b, c] = n; // expected-error {{decomposition
declaration template not supported}}
}
+#define MYC C
+
namespace Init {
- void f() {
+ template T f(T t) {
int arr[1];
struct S { int n; };
-auto &[ba
@@ -703,6 +703,48 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in
function prototype}}
return f(1) + 1;
}
+namespace GH122892 {
zyn0217 wrote:
I think the test should live in CodeGen/ rather than SemaCXX/, which mostly
contains '-fsyntax-only'
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/130228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern,
SourceLocation EllipsisLoc,
PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc,
NumExpansions);
}
+static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) {
+ if (!TA.isPackExp
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern,
SourceLocation EllipsisLoc,
PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc,
NumExpansions);
}
+static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) {
+ if (!TA.isPackExp
@@ -75,7 +75,7 @@ getDepthAndIndex(UnexpandedParameterPack UPP) {
if (const auto *TTP = dyn_cast(UPP.first))
return std::make_pair(TTP->getDepth(), TTP->getIndex());
zyn0217 wrote:
I think the users of this function shouldn't expect a
`SubstTemplateTyp
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern,
SourceLocation EllipsisLoc,
PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc,
NumExpansions);
}
+static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) {
+ if (!TA.isPackExp
https://github.com/zyn0217 approved this pull request.
thanks
https://github.com/llvm/llvm-project/pull/131165
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -703,6 +703,48 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in
function prototype}}
return f(1) + 1;
}
+namespace GH122892 {
zyn0217 wrote:
I don't know, but the original issue doesn't manifest with `-fsyntax-only`
https://godbolt.org/z/MdMz
@@ -703,6 +703,48 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in
function prototype}}
return f(1) + 1;
}
+namespace GH122892 {
zyn0217 wrote:
Oh so it is the case - looks like we now have errors for the case in question.
https://github.com/llv
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/130921
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/126723
>From 21ca76a13ca62715ce98fb2c8b0361df727769b0 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 11 Feb 2025 17:13:34 +0800
Subject: [PATCH 1/3] [Clang] Don't give up on an unsuccessful function
instantiat
zyn0217 wrote:
(Duplicate of #130919.)
https://github.com/llvm/llvm-project/pull/130921
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
Oops, I just filed #130921
https://github.com/llvm/llvm-project/pull/130919
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1655,14 +1645,8 @@ SourceLocation CallExpr::getBeginLoc() const {
if (!isTypeDependent()) {
if (const auto *Method =
dyn_cast_if_present(getCalleeDecl());
-Method && Method->isExplicitObjectMemberFunction()) {
- // Note: while we typically exp
https://github.com/zyn0217 approved this pull request.
https://github.com/llvm/llvm-project/pull/130919
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/121044
>From 77537d523bc164a86b46e83651500a4b37c0c3bf Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 24 Dec 2024 13:06:44 +0800
Subject: [PATCH 1/2] Reapply "[Clang] Improve diagnostics for expansion length
mi
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/121044
>From 77537d523bc164a86b46e83651500a4b37c0c3bf Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 24 Dec 2024 13:06:44 +0800
Subject: [PATCH] Reapply "[Clang] Improve diagnostics for expansion length
mismat
https://github.com/zyn0217 ready_for_review
https://github.com/llvm/llvm-project/pull/121044
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/126206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/125153
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 commented:
Thanks. Though I think we should just fix the problematic condition expression,
and other changes seem a bit unnecessary since they are already clear enough.
https://github.com/llvm/llvm-project/pull/127211
___
cf
@@ -13697,6 +13698,7 @@
TreeTransform::TransformDesignatedInitExpr(DesignatedInitExpr *E) {
ArrayExprs.push_back(End.get());
}
+ // Compare the transformed initializer against the original.
zyn0217 wrote:
I think the code is self-explanatory enough so
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/127211
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1701 - 1800 of 2066 matches
Mail list logo