Author: hokein Date: Thu Aug 8 05:19:01 2019 New Revision: 368282 URL: http://llvm.org/viewvc/llvm-project?rev=368282&view=rev Log: [clangd] Remove a function accidently being added in rL368261.
Modified: clang-tools-extra/trunk/clangd/AST.cpp Modified: clang-tools-extra/trunk/clangd/AST.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/AST.cpp?rev=368282&r1=368281&r2=368282&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/AST.cpp (original) +++ clang-tools-extra/trunk/clangd/AST.cpp Thu Aug 8 05:19:01 2019 @@ -73,26 +73,6 @@ bool isImplementationDetail(const Decl * D->getASTContext().getSourceManager()); } -// Returns true if the complete name of decl \p D is spelled in the source code. -// This is not the case for: -// * symbols formed via macro concatenation, the spelling location will -// be "<scratch space>" -// * symbols controlled and defined by a compile command-line option -// `-DName=foo`, the spelling location will be "<command line>". -bool isSpelledInSourceCode(const Decl *D) { - const auto &SM = D->getASTContext().getSourceManager(); - auto Loc = D->getLocation(); - // FIXME: Revisit the strategy, the heuristic is limitted when handling - // macros, we should use the location where the whole definition occurs. - if (Loc.isMacroID()) { - std::string PrintLoc = SM.getSpellingLoc(Loc).printToString(SM); - if (llvm::StringRef(PrintLoc).startswith("<scratch") || - llvm::StringRef(PrintLoc).startswith("<command line>")) - return false; - } - return true; -} - SourceLocation findName(const clang::Decl *D) { return D->getLocation(); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits