Skip to content

Commit

Permalink
[clangd] Fix incorrect RecursiveASTVisitor usage in summarizeExpr()
Browse files Browse the repository at this point in the history
Plus bonus typo fix

Differential Revision: https://reviews.llvm.org/D158248
  • Loading branch information
HighCommander4 committed Aug 19, 2023
1 parent b9d079d commit 3e69886
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang-tools-extra/clangd/InlayHints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ std::string summarizeExpr(const Expr *E) {
return getSimpleName(E->getMember()).str();
}
std::string
VisitDependentScopeMemberExpr(const DependentScopeDeclRefExpr *E) {
VisitDependentScopeDeclRefExpr(const DependentScopeDeclRefExpr *E) {
return getSimpleName(E->getDeclName()).str();
}
std::string VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *E) {
Expand Down Expand Up @@ -534,7 +534,7 @@ class InlayHintVisitor : public RecursiveASTVisitor<InlayHintVisitor> {

// Do not show parameter hints for operator calls written using operator
// syntax or user-defined literals. (Among other reasons, the resulting
// hints can look awkard, e.g. the expression can itself be a function
// hints can look awkward, e.g. the expression can itself be a function
// argument and then we'd get two hints side by side).
if (isa<CXXOperatorCallExpr>(E) || isa<UserDefinedLiteral>(E))
return true;
Expand Down

0 comments on commit 3e69886

Please sign in to comment.