diff options
Diffstat (limited to 'clang-tools-extra/clangd/XRefs.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/XRefs.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index cf5cc4eb273..3ad20522226 100644 --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -246,8 +246,7 @@ std::vector<LocatedSymbol> locateSymbolAt(ParsedAST &AST, Position Pos, } } - auto Loc = makeLocation(AST.getASTContext(), - spellingLocIfSpelled(findName(Preferred), SM), + auto Loc = makeLocation(AST.getASTContext(), nameLocation(*Preferred, SM), *MainFilePath); if (!Loc) continue; @@ -535,8 +534,7 @@ static llvm::Optional<TypeHierarchyItem> declToTypeHierarchyItem(ASTContext &Ctx, const NamedDecl &ND) { auto &SM = Ctx.getSourceManager(); - SourceLocation NameLoc = - spellingLocIfSpelled(findName(&ND), Ctx.getSourceManager()); + SourceLocation NameLoc = nameLocation(ND, Ctx.getSourceManager()); // getFileLoc is a good choice for us, but we also need to make sure // sourceLocToPosition won't switch files, so we call getSpellingLoc on top of // that to make sure it does not switch files. |

