https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/94889
>From 217c00f47aaa65b113d1c1cfd93a9c4e1d235c1a Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sun, 9 Jun 2024 11:49:18 +0800
Subject: [PATCH 1/8] [Clang] Fix two issues of CTAD for aggregates
---
clang/lib/S
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/94889
>From 217c00f47aaa65b113d1c1cfd93a9c4e1d235c1a Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sun, 9 Jun 2024 11:49:18 +0800
Subject: [PATCH 1/8] [Clang] Fix two issues of CTAD for aggregates
---
clang/lib/S
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/94889
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/95389
I was wrong: The purpose of CWG2685 is to avoid brace elision on string
literals and we should be rejecting the case.
Reverts llvm/llvm-project#95206
>From 0e8c9bca863137f14aea2cee0e05d4270b33e0e8 Mon Sep 17 0
@@ -1637,6 +1678,144 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/86629
___
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/86629
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
nit: Please rephrase the commit message before you merge this patch. A large
piece of AST involving memory addresses is really hard to decipher.
In addition, it would be nice if you can simplify the test case further - it's
super unclear why a bunch of templates are there outsid
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/95660
We had a code path in `Sema::MarkFunctionReferenced()` that deferred local
lambda instantiation even for constexprs. This resulted in any calls to them
referring to function decls that lack bodies and hence fail
https://github.com/zyn0217 ready_for_review
https://github.com/llvm/llvm-project/pull/95660
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1637,6 +1678,144 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/95660
>From c288190c313d6990580048368c60a846919f98ae Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 15 Jun 2024 20:29:24 +0800
Subject: [PATCH 1/2] [Clang] Instantiate local constexpr functions eagerly
---
cl
zyn0217 wrote:
Thanks for the review! I will commit when CI turns green.
https://github.com/llvm/llvm-project/pull/95660
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
Linux CI failed with an unrelated error.
```
TIMEOUT: lldb-api ::
functionalities/fork/concurrent_vfork/TestConcurrentVFork.py (87750 of 87750)
| TEST 'lldb-api ::
functionalities/fork/concurrent_vfork/TestConcurrentVFork.py' FAILED
``
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/95660
___
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/86629
>From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 16 Mar 2024 23:30:10 +0800
Subject: [PATCH 01/15] [clangd] Support go-to-definition on type hints. The
core p
zyn0217 wrote:
@HighCommander4 Sorry for my delay. This is ready for the next round of review,
and I'm prepared for a lot of feedback!
https://github.com/llvm/llvm-project/pull/86629
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/86629
>From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 16 Mar 2024 23:30:10 +0800
Subject: [PATCH 01/16] [clangd] Support go-to-definition on type hints. The
core p
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/95712
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -15,9 +15,12 @@
#include "support/Context.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ScopedPrinter.h"
+#include "llvm/Support/raw_ostream.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
+#include
#include
+#include
zyn0217 wrote:
W
https://github.com/zyn0217 commented:
My two cents:
While I appreciate the value of inspecting more semantic information about
lambdas, I still have mixed feelings about user experience.
Admittedly, presenting implicitly captured variables provides users with
insight into ODR-used variables,
@@ -755,12 +807,34 @@ class InlayHintVisitor : public
RecursiveASTVisitor {
bool NameHint = shouldHintName(Args[I], Name);
bool ReferenceHint = shouldHintReference(Params[I], ForwardedParams[I]);
+ bool IsDefault = isa(Args[I]);
+ HasNonDefaultArgs |= !I
@@ -372,6 +382,34 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+llvm::StringRef getLambdaCaptureName(const LambdaCapture &Capture) {
+ if (Capture.capturesVariable())
+return Capture.getCapturedVar()->getName();
+ if (Capture.capturesThis
@@ -1568,7 +1626,7 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
)cpp";
llvm::StringRef VectorIntPtr = R"cpp(
-vector array;
+vector $init[[array]];
zyn0217 wrote:
Will the range ever be used somewhere?
https://github.com/llvm/llvm-project/
@@ -504,10 +503,10 @@ struct FragmentCompiler {
auto Fast = isFastTidyCheck(Str);
if (!Fast.has_value()) {
diag(Warning,
- llvm::formatv(
- "Latency of clang-tidy check '{0}' is not known. "
- "It will only run if
@@ -281,7 +281,7 @@ struct TextDocumentEdit {
/// The text document to change.
VersionedTextDocumentIdentifier textDocument;
- /// The edits to be applied.
+ /// The edits to be applied.
zyn0217 wrote:
Ditto. Unrelated blank changes. Please revert
@@ -1458,13 +1463,66 @@ TEST(TypeHints, DefaultTemplateArgs) {
struct A {};
A foo();
auto $var[[var]] = foo();
-A bar[1];
+A baz;
+A bar[1]{};
zyn0217 wrote:
Why there's an empty initializer? Can you revert it?
https://github.com/llvm/
@@ -372,6 +382,34 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+llvm::StringRef getLambdaCaptureName(const LambdaCapture &Capture) {
+ if (Capture.capturesVariable())
+return Capture.getCapturedVar()->getName();
+ if (Capture.capturesThis
zyn0217 wrote:
> To clarify, you mean hovering over the default capture '=' or '&' right?
Yep, that's what I thought.
> I'm happy to remove the lambdas from this PR in favor of the hover approach.
No worries, but let's wait for other reviewers' opinions before we move
forward. :)
https://git
zyn0217 wrote:
Thanks for the prompt and insightful feedback; I really appreciate it! There
are a lot of comments, so it takes some time to digest them. I'll make an
effort to address them in the coming days.
https://github.com/llvm/llvm-project/pull/86629
_
@@ -1637,6 +1678,168 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
@@ -1637,6 +1678,168 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+class TypeInlayHintLabelPartBuilder
+: public TypeVisitor {
+ QualType CurrentType;
+ NestedNameSpecifier *CurrentNestedNameSpecifier;
+ ASTContext &Context;
+ StringRef M
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+class TypeInlayHintLabelPartBuilder
+: public TypeVisitor {
+ QualType CurrentType;
+ NestedNameSpecifier *CurrentNestedNameSpecifier;
+ ASTContext &Context;
+ StringRef M
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/96084
Given the following invalid code,
```cpp
template
struct S {
T *a;
};
S s = {1};
```
we produce such diagnostics currently:
```
:2:8: note: candidate template ignored: could not match 'S' against
'int'
2 |
zyn0217 wrote:
(A screenshot that helps to understand the changes here)

(compared to what we have now and what GCC gives:
https://godbolt.org/z/948M7x7fE)
https://github.com/llvm/llvm-project/pu
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/96084
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
> C++ error messages already have a reputation of being rather long; I’m
> candidly doubtful as to whether this would help most users too much...
I think this is more about making us more accurate when we want to point out
there's something wrong with users' code. Admittedly, it
zyn0217 wrote:
Thanks @Sirraide for the review! I'd like to wait a couple of days before
landing given that some folks are out for a wg21 meeting in these two weeks -
in case they have other opinions.
https://github.com/llvm/llvm-project/pull/96084
_
@@ -9192,7 +9194,7 @@ ComputeDefaultedComparisonExceptionSpec(Sema &S,
SourceLocation Loc,
EnterExpressionEvaluationContext Context(
S, Sema::ExpressionEvaluationContext::Unevaluated);
-CXXRecordDecl *RD = cast(FD->getLexicalParent());
+auto RD = getRecord
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/2] [Clang] Add diagnostic notes for implcitly generated
deductio
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/3] [Clang] Add diagnostic notes for implcitly generated
deductio
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/96084
>From 23844cd8b8fad07bce0c34f58430322090c5a793 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 19 Jun 2024 23:25:13 +0800
Subject: [PATCH 1/3] [Clang] Add diagnostic notes for implcitly generated
deductio
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
@@ -12114,6 +12115,35 @@ static void NoteFunctionCandidate(Sema &S,
OverloadCandidate *Cand,
return;
}
+ // If this is an implicit deduction guide against an implicitly defined
+ // constructor, add a note for it. Neither these deduction guides nor their
+ // corresp
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/93556
This patch takes Richard's approach of no longer modeling dependent NTTP
arguments with TemplateParamObjectDecls. Clang used to do so, which left behind
a problem in that we might mess up dependent and non-depen
@@ -221,8 +221,13 @@ static const ValueDecl *getAsSimpleValueDeclRef(const
ASTContext &Ctx,
// We model class non-type template parameters as their template parameter
// object declaration.
- if (V.isStruct() || V.isUnion())
+ if (V.isStruct() || V.isUnion()) {
+//
zyn0217 wrote:
Thanks for the review. I'm also waiting for @mizvekov in case he has some
opinions.
https://github.com/llvm/llvm-project/pull/93556
___
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/93556
>From 76639804b9e5391169e76c5b07650c11d64003de Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 28 May 2024 22:11:25 +0800
Subject: [PATCH] [Clang][Sema] Use StructuralValues to model dependent NTTP
argume
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/93556
>From 76639804b9e5391169e76c5b07650c11d64003de Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Tue, 28 May 2024 22:11:25 +0800
Subject: [PATCH 1/2] [Clang][Sema] Use StructuralValues to model dependent
NTTP ar
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/93556
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2408,9 +2408,11 @@ Expr *VarDecl::getInit() {
return cast(S);
auto *Eval = getEvaluatedStmt();
- return cast(Eval->Value.isOffset()
-? Eval->Value.get(getASTContext().getExternalSource())
-: Eval->Value.get(nullptr));
https://github.com/zyn0217 approved this pull request.
😂Thanks!
https://github.com/llvm/llvm-project/pull/93817
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/93945
This helps getTemplateInstantiationArgs to properly recover template arguments
of an enclosing concept Decl.
Fixes https://github.com/llvm/llvm-project/issues/93821
>From 088c4199dd37172a57d965fe1b22f782084e127
@@ -5004,6 +5004,20 @@ static bool CheckDeducedPlaceholderConstraints(Sema &S,
const AutoType &Type,
return true;
MultiLevelTemplateArgumentList MLTAL(Concept, CanonicalConverted,
/*Final=*/false);
+ // Build up an EvaluationContex
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/93945
>From 088c4199dd37172a57d965fe1b22f782084e127e Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 31 May 2024 18:15:54 +0800
Subject: [PATCH 1/2] [Clang][Sema] Push an evaluation context for type
constraints
@@ -5004,6 +5004,20 @@ static bool CheckDeducedPlaceholderConstraints(Sema &S,
const AutoType &Type,
return true;
MultiLevelTemplateArgumentList MLTAL(Concept, CanonicalConverted,
/*Final=*/false);
+ // Build up an EvaluationContex
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/93945
>From 088c4199dd37172a57d965fe1b22f782084e127e Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Fri, 31 May 2024 18:15:54 +0800
Subject: [PATCH 1/2] [Clang][Sema] Push an evaluation context for type
constraints
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/93945
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1637,6 +1678,144 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/86629
>From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 16 Mar 2024 23:30:10 +0800
Subject: [PATCH 01/11] [clangd] Support go-to-definition on type hints. The
core p
@@ -1637,6 +1678,144 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/86629
___
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/86629
>From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 16 Mar 2024 23:30:10 +0800
Subject: [PATCH 01/13] [clangd] Support go-to-definition on type hints. The
core p
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/86629
>From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 16 Mar 2024 23:30:10 +0800
Subject: [PATCH 01/14] [clangd] Support go-to-definition on type hints. The
core p
@@ -1576,7 +1576,10 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer(
TrailingReturnTypeLoc, &DS),
std::move(Attributes), DeclEndLoc);
-Actions.ActOnLambdaClosureQualifiers(Intro, MutableLoc);
+// We have called ActOnLa
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/93206
>From 658e9d46adf6dd79aa6aef03a1817444a880348a Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Thu, 23 May 2024 22:35:11 +0800
Subject: [PATCH 1/3] [Clang][Sema] Tweak tryCaptureVariable for unevaluated
lambda
zyn0217 wrote:
@cor3ntin I have reduced the test cases (removed duplicate ones) and hopefully
they look better. Can you please take another look? thanks!
https://github.com/llvm/llvm-project/pull/93206
___
cfe-commits mailing list
cfe-commits@lists.ll
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/93206
>From 658e9d46adf6dd79aa6aef03a1817444a880348a Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Thu, 23 May 2024 22:35:11 +0800
Subject: [PATCH 1/3] [Clang][Sema] Tweak tryCaptureVariable for unevaluated
lambda
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/94299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -std=c++2c -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+namespace std {
+struct type_info {
+ const char *name;
+};
+} // namespace std
+
+namespace GH93650_bug {
+auto func(auto... inputArgs) { return typeid(inputArgs...[0]); }
+}
https://github.com/zyn0217 approved this pull request.
Thanks! LG with a nit. And please wait for @cor3ntin for the last approval.
https://github.com/llvm/llvm-project/pull/94299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/93206
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/89019
None
>From e510a76d231de0e22ba52584a80f18deb6af91c6 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 17 Apr 2024 12:24:56 +0800
Subject: [PATCH] [clang] Distinguish unresolved templates in
UnresolvedLooku
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/89019
___
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/89019
>From 89a5bbcc89c1e43ac7f2e60f3c234c2c42928c86 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 17 Apr 2024 12:24:56 +0800
Subject: [PATCH] [clang] Distinguish unresolved templates in
UnresolvedLookupExpr
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/89019
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -186,3 +186,74 @@ class E {
#endif
template using D = int; // expected-note {{declared here}}
E ed; // expected-note {{instantiation of}}
+
+namespace non_functions {
+
+#if __cplusplus >= 201103L
+namespace PR88832 {
+template struct O {
+ static const T v = 0;
+};
+
+st
zyn0217 wrote:
The pre-commit CI is still clogging after a few hours, and I'm opening it for
feedback anyway.
https://github.com/llvm/llvm-project/pull/89019
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
https://github.com/zyn0217 ready_for_review
https://github.com/llvm/llvm-project/pull/89019
___
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/89019
>From 89a5bbcc89c1e43ac7f2e60f3c234c2c42928c86 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 17 Apr 2024 12:24:56 +0800
Subject: [PATCH 1/2] [clang] Distinguish unresolved templates in
UnresolvedLookupE
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/89019
>From 89a5bbcc89c1e43ac7f2e60f3c234c2c42928c86 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 17 Apr 2024 12:24:56 +0800
Subject: [PATCH 1/3] [clang] Distinguish unresolved templates in
UnresolvedLookupE
@@ -186,3 +186,74 @@ class E {
#endif
template using D = int; // expected-note {{declared here}}
E ed; // expected-note {{instantiation of}}
+
+namespace non_functions {
+
+#if __cplusplus >= 201103L
+namespace PR88832 {
+template struct O {
+ static const T v = 0;
+};
+
+st
@@ -186,3 +186,74 @@ class E {
#endif
template using D = int; // expected-note {{declared here}}
E ed; // expected-note {{instantiation of}}
+
+namespace non_functions {
+
+#if __cplusplus >= 201103L
+namespace PR88832 {
+template struct O {
+ static const T v = 0;
+};
+
+st
zyn0217 wrote:
@HighCommander4 Any chance to have a try on this patch? I'm looking forward to
the feedback, thanks!
https://github.com/llvm/llvm-project/pull/86629
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/89494
Since
[6163aa9](https://github.com/llvm/llvm-project/commit/6163aa96799cbad7f2f58e02c5bebee9647056a5#diff-3a7ef0bff7d2b73b4100de636f09ea68b72eda191b39c8091a6a1765d917c1a2),
we have introduced an optimization tha
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/89494
>From ba2e2a4bd2f7442003d6aa21f3d848cfef5061f6 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 20 Apr 2024 02:52:16 +0800
Subject: [PATCH] [Clang][Parser] Don't always destroy template annotations at
the
https://github.com/zyn0217 ready_for_review
https://github.com/llvm/llvm-project/pull/89494
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
> Are there actually any benefit from being that eager to delete template
> annotations?
Well, I don't have much context of that patch, but I think that makes sense in
part e.g. When we have a function that involves many generic lambdas, where we
would destroy template annotati
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/89557
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -474,6 +477,17 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool
Indent) {
for (DeclContext::decl_iterator D = DC->decls_begin(), DEnd =
DC->decls_end();
D != DEnd; ++D) {
+// Print enum members and public struct fields when
+// PrintTagTypeCont
@@ -474,6 +477,17 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool
Indent) {
for (DeclContext::decl_iterator D = DC->decls_begin(), DEnd =
DC->decls_end();
D != DEnd; ++D) {
+// Print enum members and public struct fields when
+// PrintTagTypeCont
https://github.com/zyn0217 commented:
Thank you! I have a few questions:
1) Do we want an RFC in discourse for the changes in `DeclPrinter`?
2) Do you think we should also add some test cases to `DeclPrinterTest.cpp`?
https://github.com/llvm/llvm-project/pull/89557
__
zyn0217 wrote:
> If we remove MaybeDestroyTemplateIds(); in ParseStatementOrDeclaration, does
> it fix the bug, and does it actually impact performance?
It fixes the bug; however, I'm afraid we would also lose the chance to optimize
the following:
```cpp
void foo() {
auto generic = []() {};
@@ -186,3 +186,74 @@ class E {
#endif
template using D = int; // expected-note {{declared here}}
E ed; // expected-note {{instantiation of}}
+
+namespace non_functions {
+
+#if __cplusplus >= 201103L
+namespace PR88832 {
+template struct O {
+ static const T v = 0;
+};
+
+st
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/89019
>From 89a5bbcc89c1e43ac7f2e60f3c234c2c42928c86 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 17 Apr 2024 12:24:56 +0800
Subject: [PATCH 1/4] [clang] Distinguish unresolved templates in
UnresolvedLookupE
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/89019
>From 89a5bbcc89c1e43ac7f2e60f3c234c2c42928c86 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 17 Apr 2024 12:24:56 +0800
Subject: [PATCH 1/5] [clang] Distinguish unresolved templates in
UnresolvedLookupE
zyn0217 wrote:
> One question I have is whether it would make sense to modify
> DestroyTemplateIdAnnotationsRAIIObj to not call MaybeDestroyTemplateIds() in
> the first place
I’d love to try if it were feasible, but please note that the annotation was
deleted by a direct call to MaybeDestroyT
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/89494
>From ba2e2a4bd2f7442003d6aa21f3d848cfef5061f6 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 20 Apr 2024 02:52:16 +0800
Subject: [PATCH] [Clang][Parser] Don't always destroy template annotations at
the
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/89494
>From 3d5d4d973b9a76d9a07cdd6b89b304e2c7f37308 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 20 Apr 2024 02:52:16 +0800
Subject: [PATCH] [Clang][Parser] Don't always destroy template annotations at
the
501 - 600 of 1781 matches
Mail list logo