[Lldb-commits] [libcxx] [llvm] [libunwind] [lldb] [clang-tools-extra] [mlir] [clang] [compiler-rt] [clangd] Fix typo in AST.cpp (PR #77493)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 9 08:11:51 PST 2024
https://github.com/Nour1248 created https://github.com/llvm/llvm-project/pull/77493
None
>From 4a8855eb6b54e2e073f1ee9384ec3dfc399657a5 Mon Sep 17 00:00:00 2001
From: Nour Fouad <nourfouad1248 at gmail.com>
Date: Tue, 9 Jan 2024 18:08:45 +0200
Subject: [PATCH] [clangd] Fix typo in AST.cpp
---
clang-tools-extra/clangd/AST.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/clang-tools-extra/clangd/AST.cpp b/clang-tools-extra/clangd/AST.cpp
index ae79eb21de9470..f998c3f4bc1a06 100644
--- a/clang-tools-extra/clangd/AST.cpp
+++ b/clang-tools-extra/clangd/AST.cpp
@@ -757,7 +757,7 @@ const TemplateTypeParmType *getFunctionPackType(const FunctionDecl *Callee) {
// Returns the template parameter pack type that this parameter was expanded
// from (if in the Args... or Args&... or Args&&... form), if this is the case,
// nullptr otherwise.
-const TemplateTypeParmType *getUnderylingPackType(const ParmVarDecl *Param) {
+const TemplateTypeParmType *getUnderlyingPackType(const ParmVarDecl *Param) {
const auto *PlainType = Param->getType().getTypePtr();
if (auto *RT = dyn_cast<ReferenceType>(PlainType))
PlainType = RT->getPointeeTypeAsWritten().getTypePtr();
@@ -793,7 +793,7 @@ class ForwardingCallVisitor
: public RecursiveASTVisitor<ForwardingCallVisitor> {
public:
ForwardingCallVisitor(ArrayRef<const ParmVarDecl *> Parameters)
- : Parameters{Parameters}, PackType{getUnderylingPackType(
+ : Parameters{Parameters}, PackType{getUnderlyingPackType(
Parameters.front())} {}
bool VisitCallExpr(CallExpr *E) {
@@ -859,7 +859,7 @@ class ForwardingCallVisitor
if (const auto *TTPT = getFunctionPackType(Callee)) {
// In this case: Separate the parameters into head, pack and tail
auto IsExpandedPack = [&](const ParmVarDecl *P) {
- return getUnderylingPackType(P) == TTPT;
+ return getUnderlyingPackType(P) == TTPT;
};
ForwardingInfo FI;
FI.Head = MatchingParams.take_until(IsExpandedPack);
@@ -964,7 +964,7 @@ resolveForwardingParameters(const FunctionDecl *D, unsigned MaxDepth) {
if (const auto *TTPT = getFunctionPackType(D)) {
// Split the parameters into head, pack and tail
auto IsExpandedPack = [TTPT](const ParmVarDecl *P) {
- return getUnderylingPackType(P) == TTPT;
+ return getUnderlyingPackType(P) == TTPT;
};
ArrayRef<const ParmVarDecl *> Head = Parameters.take_until(IsExpandedPack);
ArrayRef<const ParmVarDecl *> Pack =
@@ -1016,7 +1016,7 @@ resolveForwardingParameters(const FunctionDecl *D, unsigned MaxDepth) {
}
bool isExpandedFromParameterPack(const ParmVarDecl *D) {
- return getUnderylingPackType(D) != nullptr;
+ return getUnderlyingPackType(D) != nullptr;
}
} // namespace clangd
More information about the lldb-commits
mailing list