From: Haojian Wu Date: Tue, 24 Nov 2020 18:44:42 +0000 (+0100) Subject: [clangd] Add more trace spans for rename, NFC. X-Git-Tag: llvmorg-13-init~5223 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e821217cb3619449d536978bae7c9f05bdf0fa5;p=platform%2Fupstream%2Fllvm.git [clangd] Add more trace spans for rename, NFC. --- diff --git a/clang-tools-extra/clangd/refactor/Rename.cpp b/clang-tools-extra/clangd/refactor/Rename.cpp index d10a7a4..e7924b4 100644 --- a/clang-tools-extra/clangd/refactor/Rename.cpp +++ b/clang-tools-extra/clangd/refactor/Rename.cpp @@ -300,6 +300,7 @@ std::vector findOccurrencesWithinFile(ParsedAST &AST, const NamedDecl *lookupSiblingWithName(const ASTContext &Ctx, const NamedDecl &RenamedDecl, llvm::StringRef Name) { + trace::Span Tracer("LookupSiblingWithName"); const auto &II = Ctx.Idents.get(Name); DeclarationName LookupName(&II); DeclContextLookupResult LookupResult; @@ -359,6 +360,7 @@ llvm::Error makeError(InvalidName Reason) { // Return details if the rename would produce a conflict. llvm::Optional checkName(const NamedDecl &RenameDecl, llvm::StringRef NewName) { + trace::Span Tracer("CheckName"); auto &ASTCtx = RenameDecl.getASTContext(); if (isKeyword(NewName, ASTCtx.getLangOpts())) return InvalidName{InvalidName::Keywords, NewName.str()};