https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/71415
___
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.
Thank you! I didn't realize that `getActiveBits` was calculated by the count of
leading zeros, even for negative numbers. This generally looks good modulo a
question on the test.
https://github.com/llvm/llvm-project/pull/71415
___
@@ -0,0 +1,29 @@
+# RUN: clangd -lit-test < %s | FileCheck %s
zyn0217 wrote:
Rather than creating a lit-test, could you please move it to the
`HoverTests.cpp` under the unittests directory? That would be more
straightforward, and I think we could add the case t
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/71366
___
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/71366
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
On second thought I think I should not kill all the expressions involving
`PseudoObjectExpr`: I'm not sure if our ObjC / CUDA support does need that for
presenting useful hints.
https://github.com/llvm/llvm-project/pull/71366
___
cfe-c
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/71366
>From 4a878b63cbdd33833b998896120a992178438180 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 6 Nov 2023 16:50:02 +0800
Subject: [PATCH 1/3] [clangd] Don't show inlay hints for PseudoObjectExprs in
C++
zyn0217 wrote:
Thanks! Please go ahead and merge it. :-)
https://github.com/llvm/llvm-project/pull/71415
___
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/69153
___
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.
I'd like to approve the patch boldly since the findTokenAfterCompletionPoint is
mostly duplicated from `Lexer::findNextToken` except for a difference that our
version calls `Loc.getLocWithOffset(1)` rather than MeasureTokenLength() for
the
@@ -1491,6 +1491,46 @@ FuzzyFindRequest
speculativeFuzzyFindRequestForCompletion(
return CachedReq;
}
+// This function is similar to Lexer::findNextToken(), but assumes
+// that the input SourceLocation is the completion point (which is
+// a case findNextToken() does not
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/69153
___
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/69153
___
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/71279
>From d73a8e2ee683e6812c21cb1de7363b14565a96d1 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 4 Nov 2023 18:43:58 +0800
Subject: [PATCH 1/2] [clangd] Resolve the dependent type from its single
instantiat
@@ -150,6 +246,11 @@ std::vector
HeuristicResolver::resolveMemberExpr(
if (ME->isArrow()) {
BaseType = getPointeeType(BaseType);
}
+
+ if (BaseType->isDependentType())
zyn0217 wrote:
I don't know if I should assume the non-nullity for `BaseType`: All
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/71279
>From d73a8e2ee683e6812c21cb1de7363b14565a96d1 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 4 Nov 2023 18:43:58 +0800
Subject: [PATCH 1/3] [clangd] Resolve the dependent type from its single
instantiat
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/69224
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
> If so, get its TemplateTypeParmDecl, find the template whose parameter it is,
> and see if the template has a getOnlyInstantiation.
Thanks for the suggestion! Admittedly, it looks neat and terse. However, I
suspect it won't work with the present `TemplateTypeParm{Type,Decl}` m
zyn0217 wrote:
> Is it not possible to tell based on the `CallExpr` only (rather than checking
> an ancestor of it during traversal of the tree) that "this `CallExpr` is not
> explicitly written in the source"?
I'm not quite sure - Looking into the construction process for a
`__builtin_dump_s
zyn0217 wrote:
Could you please explain why the `CaptureType` might be null at the time when
exercising `tryCaptureVariable`? I'm worried that doing so would hide a more
significant issue.
https://github.com/llvm/llvm-project/pull/72230
___
cfe-commi
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/72749
___
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/72749
>From d23305db7faba1ed1464aeee6d9e0f2ee1994226 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 6 Nov 2023 16:50:02 +0800
Subject: [PATCH 1/2] [clang] Reject incomplete type arguments for
__builtin_dump_st
zyn0217 wrote:
Thanks! Added the link.
https://github.com/llvm/llvm-project/pull/72749
___
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/72749
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
@HighCommander4 While at the `HeuristicResolver`, I think we may have a bug
inside `HighlightingsBuilder` defined in `SemanticHighlighting.cpp`.
https://github.com/llvm/llvm-project/blob/6ed9a81f7ebd23f125867dd270785dd0e63043c6/clang-tools-extra/clangd/SemanticHighlighting.cpp#L5
https://github.com/zyn0217 approved this pull request.
Thank you! LGTM modulo one nit: could you please remove the nullptr member
initializer for `Resolver`? That looks unnecessary now.
https://github.com/llvm/llvm-project/pull/74971
___
cfe-commits m
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/75001
This is a follow-up patch for [D156993](https://reviews.llvm.org/D156993), that
marks only the lambda body as non-immediate context.
Fixes https://github.com/llvm/llvm-project/issues/71684
>From 8681b3c9f5e19b6
zyn0217 wrote:
Note I'm not adding an extra release note since the previous implementation has
done that and hasn't been cherry-picked or released yet.
https://github.com/llvm/llvm-project/pull/75001
___
cfe-commits mailing list
cfe-commits@lists.llvm
zyn0217 wrote:
> Out of curiosity, I dialled into today's LLVM office hours and asked Aaron
> Ballman about this
Thank you so much for making the effort on this issue. :)
> ...just change the code for building the invented CallExprs to give them an
> invalid SourceLocation
Interesting idea a
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/72749
We used to assume that the CXXRecordDecl passed to the 1st argument always had
a definition. This is not true since a pointer to an incomplete type was not
excluded.
>From d23305db7faba1ed1464aeee6d9e0f2ee19942
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/72750
This reflects the comment in
https://github.com/llvm/llvm-project/pull/71366#issuecomment-1817271492.
As that PR suggests, the invented CallExpr's source location previously pointed
to the beginning of the `__b
zyn0217 wrote:
> The CI run shows the test
> [Sema/builtin-dump-struct.c](https://searchfox.org/llvm/source/clang/test/Sema/builtin-dump-struct.c)
> is failing.
Oops, I didn't even realize there's such a test for C. I had only run the
Sema/builtin-dump-struct.cpp locally and it passed. :(
>
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/72750
___
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/72749
>From d23305db7faba1ed1464aeee6d9e0f2ee1994226 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 6 Nov 2023 16:50:02 +0800
Subject: [PATCH 1/2] [clang] Reject incomplete type arguments for
__builtin_dump_st
@@ -713,6 +713,11 @@ static ExprResult SemaBuiltinDumpStruct(Sema &S, CallExpr
*TheCall) {
return ExprError();
}
const RecordDecl *RD = PtrArgType->getPointeeType()->getAsRecordDecl();
+ if (!RD->isCompleteDefinition()) {
zyn0217 wrote:
Thank you! Ad
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/71366
>From 808c141c34218dd542b00149216adc061567dd31 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 6 Nov 2023 16:50:02 +0800
Subject: [PATCH 1/4] [clangd] Don't show inlay hints for PseudoObjectExprs in
C++
zyn0217 wrote:
Since the other PR turned out to be infeasible, I'm overriding
`TraversePseudoObjectExpr` now.
https://github.com/llvm/llvm-project/pull/71366
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
@@ -1724,6 +1724,33 @@ TEST(InlayHints, RestrictRange) {
ElementsAre(labelIs(": int"), labelIs(": char")));
}
+TEST(ParameterHints, PseudoObjectExpr) {
+ Annotations Code(R"cpp(
+struct S {
+ __declspec(property(get=GetX, put=PutX)) int x[];
+ int
@@ -1724,6 +1724,33 @@ TEST(InlayHints, RestrictRange) {
ElementsAre(labelIs(": int"), labelIs(": char")));
}
+TEST(ParameterHints, PseudoObjectExpr) {
+ Annotations Code(R"cpp(
+struct S {
+ __declspec(property(get=GetX, put=PutX)) int x[];
+ int
@@ -589,6 +589,24 @@ class InlayHintVisitor : public
RecursiveASTVisitor {
return true;
}
+ bool TraversePseudoObjectExpr(PseudoObjectExpr *E) {
+// Do not show inlay hints for the __builtin_dump_struct, which would
+// expand to a PseudoObjectExpr that include
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/71366
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1724,6 +1724,33 @@ TEST(InlayHints, RestrictRange) {
ElementsAre(labelIs(": int"), labelIs(": char")));
}
+TEST(ParameterHints, PseudoObjectExpr) {
+ Annotations Code(R"cpp(
+struct S {
+ __declspec(property(get=GetX, put=PutX)) int x[];
+ int
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/71366
>From 808c141c34218dd542b00149216adc061567dd31 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 6 Nov 2023 16:50:02 +0800
Subject: [PATCH 1/5] [clangd] Don't show inlay hints for PseudoObjectExprs in
C++
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/71366
>From 808c141c34218dd542b00149216adc061567dd31 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 6 Nov 2023 16:50:02 +0800
Subject: [PATCH 1/6] [clangd] Don't show inlay hints for PseudoObjectExprs in
C++
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/71366
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 commented:
Thank you for working on this! Some nit comments, hope you don't mind.
(Also invited some clang folks to have a detailed look at this. :=)
https://github.com/llvm/llvm-project/pull/70548
___
cfe-commits mailing li
@@ -3553,6 +3553,56 @@ static unsigned getPackIndexForParam(Sema &S,
llvm_unreachable("parameter index would not be produced from template");
}
+// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl`
+// we try to instantiate and update its explicit specifie
@@ -3553,6 +3553,56 @@ static unsigned getPackIndexForParam(Sema &S,
llvm_unreachable("parameter index would not be produced from template");
}
+// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl`
+// we try to instantiate and update its explicit specifie
@@ -3553,6 +3553,56 @@ static unsigned getPackIndexForParam(Sema &S,
llvm_unreachable("parameter index would not be produced from template");
}
+// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl`
+// we try to instantiate and update its explicit specifie
@@ -3553,6 +3553,56 @@ static unsigned getPackIndexForParam(Sema &S,
llvm_unreachable("parameter index would not be produced from template");
}
+// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl`
+// we try to instantiate and update its explicit specifie
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/70548
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3553,6 +3553,49 @@ static unsigned getPackIndexForParam(Sema &S,
llvm_unreachable("parameter index would not be produced from template");
}
+// if `Specialization` is a `CXXConstructorDecl` or `CXXConversionDecl`
+// we try to instantiate and update its explicit specifie
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/70548
___
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/71279
This is an enhancement to the HeuristicResolver, trying to extract the deduced
type from the single instantiation for a template. This partially addresses the
point #1 from
https://github.com/clangd/clangd/issue
@@ -46,6 +50,98 @@ const Type *resolveDeclsToType(const std::vector &Decls,
return nullptr;
}
+// Visitor that helps to extract deduced type from instantiated entities.
+// This merely performs the source location comparison against each Decl
+// until it finds a Decl with t
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/71279
___
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/71366
This closes https://github.com/clangd/clangd/issues/1813.
PseudoObjectExprs in C++ are currently not very interesting but probably mess
up inlay hints.
>From 4a878b63cbdd33833b998896120a992178438180 Mon Sep 17
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/71366
>From 4a878b63cbdd33833b998896120a992178438180 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 6 Nov 2023 16:50:02 +0800
Subject: [PATCH 1/2] [clangd] Don't show inlay hints for PseudoObjectExprs in
C++
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/71366
___
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/71366
___
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/75697
Fixes https://github.com/llvm/llvm-project/issues/73885.
Substituting into constraints for invalid TemplateDecls might still yield
dependent expressions and end up crashing later while attempting evaluation.
>F
@@ -353,6 +353,10 @@ static ExprResult calculateConstraintSatisfaction(
if (Inst.isInvalid())
return ExprError();
+ // An empty expression for substitution failure messages.
+ if (Template && Template->isInvalidDecl())
+retur
zyn0217 wrote:
In addition to Nathan’s advice, I have a question about the commit message
> if the functions override a noexcept virtual function.
I didn't see anything reflecting this condition; are you still working on this
patch? Would you mind adding a WIP prefix to the title before everythi
zyn0217 wrote:
> ...which is called during code completion to generate the override function
> declarator based on the FunctionDecl of the virtual function in the base.
The place you're patching is not only specific to "completing override
functions", but handles all completion strings involvi
zyn0217 wrote:
Bonus: It appears that neither gcc nor clang implements a provision change from
[CWG1351](https://cplusplus.github.io/CWG/issues/1351.html),
> [except.spec]p4
> ..., **unless the overriding function is defined as deleted.**
giving errors on the following code.
```cpp
struct B {
zyn0217 wrote:
> Maybe this deserves a new issue for clang Sema?
Sounds reasonable to me. Feel free to put up a PR / issue for this if you are
interested.
https://github.com/llvm/llvm-project/pull/75937
___
cfe-commits mailing list
cfe-commits@lists.
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/73355
See https://github.com/llvm/llvm-project/issues/72025 for the bug and its
diagnosis.
>From 3ff1b189cf55d3705b2823dc39eaaf710fa26541 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 25 Nov 2023 02:01:22 +0
zyn0217 wrote:
Thank you again for bothering with this, and sorry for not responding for over
a week.
Just now, I replicated the experimentation
> I've done some local experimentation, and what I'm seeing is that
> `TemplateTypeParmDecl::getDeclContext()` does return the FunctionDecl or
> CX
zyn0217 wrote:
> I also discovered some complications related to nested templates, and I have
> some thoughts on how to resolve them, but I'm going to suggest that we start
> with getting a simple case (e.g. just one level of templates, no nested
> templates) to work, and then tackle nested te
zyn0217 wrote:
Ping. And invited @cor3ntin to kindly take a look at this.
https://github.com/llvm/llvm-project/pull/73355
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
The code-formatter failed on other unrelated lines, so I think I'd better not
to touch them.
https://github.com/llvm/llvm-project/pull/73355
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
@@ -589,6 +589,24 @@ class InlayHintVisitor : public
RecursiveASTVisitor {
return true;
}
+ bool TraversePseudoObjectExpr(PseudoObjectExpr *E) {
+// Do not show inlay hints for the __builtin_dump_struct, which would
+// expand to a PseudoObjectExpr that include
https://github.com/zyn0217 closed
https://github.com/llvm/llvm-project/pull/73355
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
Another issue I've encountered while at it is that, given the following code,
```cpp
void foo();
auto lambda = [] {
return ^foo();
};
```
let `N` represent the selection node for the expression `foo()`,
`N.getDeclContext()` then yields `TranslationUnitDecl` rather than the
`CXX
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/76329
We used to consider the `DeclContext` for selection nodes inside a lambda as
the enclosing scope of the lambda expression, rather than the lambda itself.
For example,
```cpp
void foo();
auto lambda = [] {
ret
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/71279
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/zyn0217 converted_to_draft
https://github.com/llvm/llvm-project/pull/71279
___
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/71279
>From c0703d7d9549e82434b37f9d5658b566a480d752 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sat, 4 Nov 2023 18:43:58 +0800
Subject: [PATCH 1/4] [clangd] Resolve the dependent type from its single
instantiat
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/76329
>From c0b04507075b39e494d3e6fa39168bc47b92f338 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sun, 24 Dec 2023 18:08:30 +0800
Subject: [PATCH 1/2] [clangd] Handle lambda scopes inside
Node::getDeclContext()
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/76329
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
friendly ping~
https://github.com/llvm/llvm-project/pull/75001
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zyn0217 wrote:
Ping. And Happy New Year 2024!
https://github.com/llvm/llvm-project/pull/76329
___
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 for your contribution! A couple of nit-picks, and I’d leave the approval
to other folks.
https://github.com/llvm/llvm-project/pull/76668
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/76668
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -813,6 +813,21 @@ TEST(SourceCodeTests, isKeywords) {
EXPECT_FALSE(isKeyword("override", LangOpts));
}
+TEST(SourceCodeTests, isSpelledInSource) {
+ Annotations Test(R"cpp(
+int abc = 1;
+)cpp");
+
+ ParsedAST AST = TestTU::withCode(Test.code()).build();
+
@@ -232,7 +232,12 @@ bool isSpelledInSource(SourceLocation Loc, const
SourceManager &SM) {
if (Loc.isFileID())
return true;
auto Spelling = SM.getDecomposedSpellingLoc(Loc);
- StringRef SpellingFile = SM.getSLocEntry(Spelling.first).getFile().getName();
+ bool Invali
@@ -232,7 +232,12 @@ bool isSpelledInSource(SourceLocation Loc, const
SourceManager &SM) {
if (Loc.isFileID())
return true;
auto Spelling = SM.getDecomposedSpellingLoc(Loc);
- StringRef SpellingFile = SM.getSLocEntry(Spelling.first).getFile().getName();
+ bool Invali
https://github.com/zyn0217 created
https://github.com/llvm/llvm-project/pull/76811
This fixes the bug introduced by
https://github.com/llvm/llvm-project/commit/6db007a0654ed7a6ed5c3aa3b61a937c19a6bc6b.
We construct placeholder template arguments for template-template parameters to
avoid mismat
zyn0217 wrote:
I realized this still crashes the code with NTTP. I will look into this.
```cpp
template
concept C = false;
template struct S {};
template typename T>
auto wow(T ts) {
return ts.x;
}
int main() { return wow<3>(S{}); }
```
https://github.com/llvm/llvm-project/pull/76811
__
zyn0217 wrote:
It is interesting to note that, if we exchange the position of two template
parameters, i.e.
```cpp
template
concept C = false;
template struct S {};
template typename T, unsigned N> // The
template-template parameter now precedes the NTTP
int wow(T ts);
int main() { retur
zyn0217 wrote:
Just get back to this again. So, I have explored the other case and found it
particular to explicit template arguments. In fact, we could slightly revise
the motivating case to
```cpp
template
concept C = false;
template typename T>
int wow(T ts);
template struct S {};
int
@@ -345,15 +345,19 @@ MultiLevelTemplateArgumentList
Sema::getTemplateInstantiationArgs(
using namespace TemplateInstArgsHelpers;
const Decl *CurDecl = ND;
+
+ if (!ND)
zyn0217 wrote:
> Can we also get a comment here why this makes sense to call
> `Dec
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/76811
___
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/76811
>From 1164c705a8515d39bc9d4404e8523da8876d81cf Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 3 Jan 2024 19:33:01 +0800
Subject: [PATCH 1/2] [Clang] Correctly construct template arguments for
file-scope
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/76811
___
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/76811
___
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/76811
>From 1164c705a8515d39bc9d4404e8523da8876d81cf Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 3 Jan 2024 19:33:01 +0800
Subject: [PATCH 1/3] [Clang] Correctly construct template arguments for
file-scope
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/76811
>From 1164c705a8515d39bc9d4404e8523da8876d81cf Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Wed, 3 Jan 2024 19:33:01 +0800
Subject: [PATCH 1/3] [Clang] Correctly construct template arguments for
file-scope
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/75001
>From 8681b3c9f5e19b6ae977321d5d4154113273c2a0 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Sun, 12 Nov 2023 13:21:03 +0800
Subject: [PATCH 1/2] [clang] Correctly implement CWG 2672
This is a follow-up patc
zyn0217 wrote:
Thank you folks!
https://github.com/llvm/llvm-project/pull/75001
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 1616 matches
Mail list logo