HighCommander4 wrote:
The title of the PR can probably be improved. The current title describes the
symptom the patch fixes rather than the change it makes (which I don't
understand well).
(I changed it from the Phabricator revision's title, which was "[clangd] WIP:
fix several bugs relating
https://github.com/HighCommander4 converted_to_draft
https://github.com/llvm/llvm-project/pull/95200
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HighCommander4 wrote:
Converted to a draft because, as mentioned in
https://github.com/clangd/clangd/issues/337#issuecomment-2162175454, the patch
doesn't seem to actually fix the issue it's supposed to fix.
https://github.com/llvm/llvm-project/pull/95200
__
@@ -1637,6 +1678,144 @@ 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
@@ -174,6 +175,29 @@ SourceLocation nameLocation(const clang::Decl &D, const
SourceManager &SM) {
return SM.getExpansionLoc(L);
}
+// Expects Loc to be a SpellingLocation, will bail out otherwise as it can't
HighCommander4 wrote:
nit: please move the comme
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+class TypeInlayHintLabelPartBuilder
+: public TypeVisitor {
+ QualType CurrentType;
+ NestedNameSpecifier *CurrentNestedNameSpecifier;
+ ASTContext &Context;
+ StringRef M
@@ -1005,14 +1332,22 @@ class InlayHintVisitor : public
RecursiveASTVisitor {
// The sugared type is more useful in some cases, and the canonical
// type in other cases.
auto Desugared = maybeDesugar(AST, T);
-std::string TypeName = Desugared.getAsString(TypeHi
https://github.com/HighCommander4 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
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+class TypeInlayHintLabelPartBuilder
HighCommander4 wrote:
suggestion for shorter name: `TypeHintBuilder`
https://github.com/llvm/llvm-project/pull/86629
___
@@ -1005,14 +1332,22 @@ class InlayHintVisitor : public
RecursiveASTVisitor {
// The sugared type is more useful in some cases, and the canonical
// type in other cases.
auto Desugared = maybeDesugar(AST, T);
-std::string TypeName = Desugared.getAsString(TypeHi
@@ -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
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+class TypeInlayHintLabelPartBuilder
+: public TypeVisitor {
+ QualType CurrentType;
+ NestedNameSpecifier *CurrentNestedNameSpecifier;
+ ASTContext &Context;
+ StringRef M
@@ -1005,14 +1332,22 @@ class InlayHintVisitor : public
RecursiveASTVisitor {
// The sugared type is more useful in some cases, and the canonical
// type in other cases.
auto Desugared = maybeDesugar(AST, T);
-std::string TypeName = Desugared.getAsString(TypeHi
https://github.com/HighCommander4 requested changes to this pull request.
Thanks for the updated patch, this generally looks very nice!
It's a bit unfortunate that we have to reimplement parts of type printing like
handling qualifiers and pointers/references. I wouldn't be surprised if we get
@@ -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
@@ -372,6 +374,292 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+class TypeInlayHintLabelPartBuilder
+: public TypeVisitor {
+ QualType CurrentType;
+ NestedNameSpecifier *CurrentNestedNameSpecifier;
+ ASTContext &Context;
+ StringRef M
@@ -1637,6 +1678,168 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
HighCommander4 wrote:
Since the patch is approved, and as far as I can tell there aren't any comments
remaining to be addressed, I will go ahead and merge this.
https://github.com/llvm/llvm-project/pull/87208
___
cfe-commits mailing list
cfe-commits@l
HighCommander4 wrote:
@vvd170501 I need to specify a commit message when merging. Github offers the
PR description by default, but it seems slightly out of date (and some of it
seems unnecessary).
I would like to revise it as follows, could you look it over please:
```
[clangd] Add config opt
https://github.com/HighCommander4 closed
https://github.com/llvm/llvm-project/pull/87208
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HighCommander4 wrote:
> @HighCommander4, overall it looks good, but I'd replace "enables
> include-cleaner checks" with "enables unused include check", because the
> option doesn't affect missing include check.
Thanks, revised and merged.
https://github.com/llvm/llvm-project/pull/87208
__
HighCommander4 wrote:
> The failures are related to new diagnostics that are issued as a side effect
> of running additional checks in BuildDeclarationNameExpr().
A closer investigation has revealed that this diagnosis wasn't quite accurate.
The three `SemaCXX` failures were not in fact caused
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/88645
>From 97170ed63643832f305254ba1788b99f90f9330d Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls
@@ -13435,8 +13435,7 @@ void Sema::checkNonTrivialCUnion(QualType QT,
SourceLocation Loc,
void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
// If there is no declaration, there was an error parsing it. Just ignore
// the initializer.
- if (!R
@@ -13456,6 +13455,14 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr
*Init, bool DirectInit) {
return;
}
+ if (VDecl->isInvalidDecl()) {
+CorrectDelayedTyposInExpr(Init, VDecl);
+VDecl->setInit(
+CreateRecoveryExpr(Init->getBeginLoc(), Init->ge
HighCommander4 wrote:
> Thanks for the improvement!
>
> Can you also add a test case?
Thanks for the feedback!
I added a new test case. However, the patch currently fails two existing test
cases:
Clang :: Parser/cxx-class.cpp
Clang :: SemaCXX/cxx1z-init-statement.cpp
I will leave the PR
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/88645
>From 07424d8ee99fc418d071960bbdd4185564025139 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls
HighCommander4 wrote:
> I added a new test case. However, the patch currently fails two existing test
> cases:
>
> Clang :: Parser/cxx-class.cpp
> Clang :: SemaCXX/cxx1z-init-statement.cpp
>
> I will leave the PR as a Draft while I investigate these failures.
The latest version of the patch f
https://github.com/HighCommander4 ready_for_review
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/88645
>From b43d8ddf8846db8a77d01c9fb2d246a0d0ba2ab2 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls
HighCommander4 wrote:
Sorry I haven't had a chance to look at this yet. I've been busy with another
project, and will continue to be for another week or so. I hope to look at this
soon!
https://github.com/llvm/llvm-project/pull/86629
___
cfe-commits
HighCommander4 wrote:
> @HighCommander4 Ping. Could you review this PR or suggest other reviewers,
> please?
I'm not very familiar with include-cleaner, but I added some reviewers who are.
https://github.com/llvm/llvm-project/pull/87208
___
cfe-commi
https://github.com/HighCommander4 created
https://github.com/llvm/llvm-project/pull/89557
Fixes https://github.com/clangd/clangd/issues/959
>From d98c95bf213f0c6e81a46a9e37d376b855bb4867 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 21 Apr 2024 20:30:16 -0400
Subject: [PATCH] [clangd]
https://github.com/HighCommander4 ready_for_review
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
HighCommander4 wrote:
A few things I would appreciate feedback on:
1. I know a [previous comment on the
bug](https://github.com/clangd/clangd/issues/959#issuecomment-998927030) stated
"We don't show bodies of classes/enums/functions etc by policy", but can we
consider changing this policy in
https://github.com/HighCommander4 created
https://github.com/llvm/llvm-project/pull/89570
Fixes https://github.com/clangd/clangd/issues/2020
>From d98c95bf213f0c6e81a46a9e37d376b855bb4867 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 21 Apr 2024 20:30:16 -0400
Subject: [PATCH 1/2] [cl
HighCommander4 wrote:
(This builds on https://github.com/llvm/llvm-project/pull/89557 and the commit
view shows both commits. I still need to figure out how to do proper stacked
PRs...)
https://github.com/llvm/llvm-project/pull/89570
___
cfe-commits
HighCommander4 wrote:
@mizvekov does the updated patch look reasonable to you?
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HighCommander4 wrote:
> what about showing this kind of "summary" only when hovering over the
> declaration of the symbol, rather than references?
Did you mean the other way around (references and not declaration, since when
you're at the declaration you're likely already looking at the fields
HighCommander4 wrote:
Is there a bug report this is fixing? Or a test case?
https://github.com/llvm/llvm-project/pull/99514
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13435,16 +13435,18 @@ void Sema::checkNonTrivialCUnion(QualType QT,
SourceLocation Loc,
void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
// If there is no declaration, there was an error parsing it. Just ignore
// the initializer.
- if (
https://github.com/HighCommander4 edited
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/88645
>From c24e79da57fc69d2f353a5533a3cc26313301a71 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/81662
>From 480cabcfeb42542746026bba753b4170e08bb8ae Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Tue, 13 Feb 2024 12:26:17 -0500
Subject: [PATCH] [clang][Sema] Improve error recovery for id-expressions
re
@@ -3453,6 +3453,10 @@ ExprResult Sema::BuildDeclarationNameExpr(const
CXXScopeSpec &SS,
NeedsADL, R.isOverloadedResult(),
R.begin(), R.end());
+ if (ULE && R.isSingleResult() && R.getFoundDecl()->isInvali
HighCommander4 wrote:
(OpenMP failure still remains to be fixed.)
https://github.com/llvm/llvm-project/pull/81662
___
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
HighCommander4 wrote:
> > 3. Regarding the implementation approach, is it fine to add a flag to
> > `PrintingPolicy` (which is a clang utility class used in a variety of
> > places) for a clangd-specific use case like this? I did it this way because
> > the alternative seemed to involve duplic
HighCommander4 wrote:
> I have a few questions:
>
>1. Do we want an RFC in discourse for the changes in `DeclPrinter`?
An RFC might be overkill, but asking for review from a clang code owner for
changes to an interface such as `PrintingPolicy` or `PrintingCallbacks` is
probably a good ide
HighCommander4 wrote:
I'm planning to revise the patch to make the following changes:
1. Put the new behaviour behind a config option (I'm thinking `Hover` -->
`ShowFields`)
2. Add C language mode tests
3. Use `PrintingCallbacks` instead of a `PrintingPolicy` flag
https://github.com/llvm/ll
https://github.com/HighCommander4 converted_to_draft
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
@@ -13435,16 +13435,18 @@ void Sema::checkNonTrivialCUnion(QualType QT,
SourceLocation Loc,
void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) {
// If there is no declaration, there was an error parsing it. Just ignore
// the initializer.
- if (
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/88645
>From d8236b6a2feb27538fc131c30768d2247b7b86cb Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 14 Apr 2024 02:41:48 -0400
Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls
https://github.com/HighCommander4 closed
https://github.com/llvm/llvm-project/pull/88645
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/89570
>From 44aba390954c7b551ed7102e8e7b4209207c0d87 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Mon, 22 Apr 2024 02:24:14 -0400
Subject: [PATCH] [clangd] Show definition of underlying struct when hovering
https://github.com/HighCommander4 edited
https://github.com/llvm/llvm-project/pull/89570
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HighCommander4 wrote:
Updated patch with the following changes:
* Decoupled from https://github.com/clangd/clangd/issues/959
* Handle the case of multiple layers of typedefs, and add tests for this case
* Add C language specific tests
https://github.com/llvm/llvm-project/pull/89570
_
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/89557
>From fcb2ac4c68554d9c708b3db779b5570ff94725e8 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 21 Apr 2024 20:30:16 -0400
Subject: [PATCH] [clangd] Show struct fields and enum members in hovers
Fix
https://github.com/HighCommander4 ready_for_review
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
HighCommander4 wrote:
> I'm planning to revise the patch to make the following changes:
>
>1. Put the new behaviour behind a config option (I'm thinking `Hover` -->
> `ShowFields`)
>2. Add C language mode tests
>3. Use `PrintingCallbacks` instead of a `PrintingPolicy` flag
These ch
HighCommander4 wrote:
Here is a reduced testcase for the OpenMP test failure:
```c++
#pragma omp declare target
static long double ld_return1e() { return 0; }
void external() {
void *p1 = reinterpret_cast(&ld_return1e);
}
#pragma omp end declare target
```
When built with the following com
HighCommander4 wrote:
@twmht To my knowledge, clang and clangd have only ever supported the
`@file.rsp` response file syntax.
The commands in the linked thread use the `--options-file file.rsp` syntax,
which clang and clangd do not support.
https://github.com/clangd/vscode-clangd/issues/592 i
https://github.com/HighCommander4 created
https://github.com/llvm/llvm-project/pull/106329
Fixes https://github.com/llvm/llvm-project/issues/99617
>From c5b3ae9c2cad6a0b0ada0ebb6adca117a3bfa012 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Tue, 27 Aug 2024 22:50:42 -0400
Subject: [PATCH] [
@@ -702,6 +704,10 @@ ParsedAST::build(llvm::StringRef Filename, const
ParseInputs &Inputs,
log("Execute() failed when building AST for {0}: {1}", MainInput.getFile(),
toString(std::move(Err)));
+ // Disable the macro collector for the remainder of this function,
https://github.com/HighCommander4 closed
https://github.com/llvm/llvm-project/pull/106329
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -702,6 +704,10 @@ ParsedAST::build(llvm::StringRef Filename, const
ParseInputs &Inputs,
log("Execute() failed when building AST for {0}: {1}", MainInput.getFile(),
toString(std::move(Err)));
+ // Disable the macro collector for the remainder of this function,
https://github.com/HighCommander4 approved this pull request.
https://github.com/llvm/llvm-project/pull/106354
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 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
https://github.com/HighCommander4 requested changes to this pull request.
Apologies for the slow response time, it's been quite a busy summer.
High-level feedback:
* Let's definitely split the default arguments part from the lambda captures
part. Even if we decide we want both, it helps to hav
@@ -1681,6 +1681,21 @@ enum class InlayHintKind {
/// This is a clangd extension.
BlockEnd = 4,
+ /// An inlay hint that is for a variable captured implicitly in a lambda.
+ ///
+ /// An example of parameter hint for implicit lambda captures:
+ ///[&^] { return A;
@@ -372,6 +383,38 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) {
return Params;
}
+llvm::StringRef getLambdaCaptureName(const LambdaCapture &Capture) {
+ switch (Capture.getCaptureKind()) {
+ case LCK_This:
+ case LCK_StarThis:
+return llvm::StringRef{"thi
@@ -755,12 +812,33 @@ class InlayHintVisitor : public
RecursiveASTVisitor {
bool NameHint = shouldHintName(Args[I], Name);
bool ReferenceHint = shouldHintReference(Params[I], ForwardedParams[I]);
+ bool IsDefault = isa(Args[I]);
HighCommander
@@ -709,7 +762,8 @@ class InlayHintVisitor : public
RecursiveASTVisitor {
private:
using NameVec = SmallVector;
- void processCall(Callee Callee, llvm::ArrayRef Args) {
+ void processCall(Callee Callee, SourceRange LParenOrBraceRange,
HighCommander4 wrote
https://github.com/HighCommander4 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
https://github.com/HighCommander4 approved this pull request.
Thanks for catching this!
https://github.com/llvm/llvm-project/pull/90948
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HighCommander4 wrote:
> Bump @HighCommander4 - did you get a chance to review this?
Hi @torshepherd! Sorry for not being more responsive on this. I haven't had as
much time as I'd like to spend on clangd reviews recently, and certainly not
enough to keep up with the volume of review requests t
HighCommander4 wrote:
If I'm understanding correctly, the implementation approach in this PR only
finds callees in the current translation unit.
The approach in #77556 uses the project's index to find callees across
translation unit boundaries.
Regarding reviews: yes, it seems quite unfortuna
https://github.com/HighCommander4 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
@@ -1637,6 +1678,144 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
@@ -73,6 +86,34 @@ MATCHER_P2(HintMatcher, Expected, Code,
llvm::to_string(Expected)) {
return true;
}
+MATCHER_P2(HintLabelPieceMatcher, Expected, Code, llvm::to_string(Expected)) {
+ llvm::StringRef ExpectedView(Expected.Label);
+ std::string ResultLabel = arg.value;
+
@@ -1637,6 +1678,144 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
@@ -1637,6 +1678,144 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
https://github.com/HighCommander4 commented:
Apologies for the long wait. I'm excited about this enhancement, thanks for
working on it!
I've only looked at the tests so far. Will look at the implementation in the
coming days but wanted to share my thoughts so far.
https://github.com/llvm/llvm
@@ -55,6 +55,19 @@ struct ExpectedHint {
}
};
+struct ExpectedHintLabelPiece {
+ std::string Label;
+ std::optional PointsTo = std::nullopt;
HighCommander4 wrote:
It's not immediately clear what this stores, let's add:
```
// Stores the name of a range a
@@ -1637,6 +1678,144 @@ TEST(TypeHints, SubstTemplateParameterAliases) {
ExpectedHint{": static_vector", "vector_name"});
}
+template
+void assertTypeLinkHints(StringRef Code, StringRef HintRange,
+ Labels... ExpectedLabels) {
+
https://github.com/HighCommander4 edited
https://github.com/llvm/llvm-project/pull/93404
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 approved this pull request.
Thank you! Looks good with one suggested change.
https://github.com/llvm/llvm-project/pull/93404
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
@@ -5680,8 +5680,16 @@ QualType getApproximateType(const Expr *E) {
}
}
if (const auto *UO = llvm::dyn_cast(E)) {
-if (UO->getOpcode() == UnaryOperatorKind::UO_Deref)
- return UO->getSubExpr()->getType()->getPointeeType();
+if (UO->getOpcode() == UnaryOpera
Author: Nathan Ridge
Date: 2021-04-25T16:43:58-04:00
New Revision: ddfe13e757cb72c056cba8d889d6cb8ee69f1afa
URL:
https://github.com/llvm/llvm-project/commit/ddfe13e757cb72c056cba8d889d6cb8ee69f1afa
DIFF:
https://github.com/llvm/llvm-project/commit/ddfe13e757cb72c056cba8d889d6cb8ee69f1afa.diff
Author: Nathan Ridge
Date: 2021-04-25T16:45:04-04:00
New Revision: d941863de2becb3d8d2e00676fc7125974934c7f
URL:
https://github.com/llvm/llvm-project/commit/d941863de2becb3d8d2e00676fc7125974934c7f
DIFF:
https://github.com/llvm/llvm-project/commit/d941863de2becb3d8d2e00676fc7125974934c7f.diff
Author: Nathan Ridge
Date: 2021-04-25T19:20:10-04:00
New Revision: 753b247d71d7e74dd6998735848a2d9e0b6317de
URL:
https://github.com/llvm/llvm-project/commit/753b247d71d7e74dd6998735848a2d9e0b6317de
DIFF:
https://github.com/llvm/llvm-project/commit/753b247d71d7e74dd6998735848a2d9e0b6317de.diff
Author: Nathan Ridge
Date: 2021-04-25T19:20:12-04:00
New Revision: 6f6cf2da8d9453f2bd57978be1e5d0765ea50a36
URL:
https://github.com/llvm/llvm-project/commit/6f6cf2da8d9453f2bd57978be1e5d0765ea50a36
DIFF:
https://github.com/llvm/llvm-project/commit/6f6cf2da8d9453f2bd57978be1e5d0765ea50a36.diff
Author: Nathan Ridge
Date: 2021-04-25T19:20:14-04:00
New Revision: c624e701491c320cf5c662006082a8e956c30e8d
URL:
https://github.com/llvm/llvm-project/commit/c624e701491c320cf5c662006082a8e956c30e8d
DIFF:
https://github.com/llvm/llvm-project/commit/c624e701491c320cf5c662006082a8e956c30e8d.diff
Author: Nathan Ridge
Date: 2021-05-03T00:55:22-04:00
New Revision: 43cbf2bb84eb319ff3e95b3316344ece35ea59b1
URL:
https://github.com/llvm/llvm-project/commit/43cbf2bb84eb319ff3e95b3316344ece35ea59b1
DIFF:
https://github.com/llvm/llvm-project/commit/43cbf2bb84eb319ff3e95b3316344ece35ea59b1.diff
Author: Nathan Ridge
Date: 2021-05-03T01:01:57-04:00
New Revision: cea736e5b8a48065007a591d71699b53c04d95b3
URL:
https://github.com/llvm/llvm-project/commit/cea736e5b8a48065007a591d71699b53c04d95b3
DIFF:
https://github.com/llvm/llvm-project/commit/cea736e5b8a48065007a591d71699b53c04d95b3.diff
Author: Nathan Ridge
Date: 2021-05-03T01:19:07-04:00
New Revision: 1f1fb5e8e6b214f7f13a4e4731b6d6add33508aa
URL:
https://github.com/llvm/llvm-project/commit/1f1fb5e8e6b214f7f13a4e4731b6d6add33508aa
DIFF:
https://github.com/llvm/llvm-project/commit/1f1fb5e8e6b214f7f13a4e4731b6d6add33508aa.diff
Author: Nathan Ridge
Date: 2021-05-03T01:37:09-04:00
New Revision: 3504e50b6db5ec71cf0df5a14a2576c1003614c9
URL:
https://github.com/llvm/llvm-project/commit/3504e50b6db5ec71cf0df5a14a2576c1003614c9
DIFF:
https://github.com/llvm/llvm-project/commit/3504e50b6db5ec71cf0df5a14a2576c1003614c9.diff
401 - 500 of 974 matches
Mail list logo