[clang-tools-extra] r329380 - [clangd] move comment to the right place. NFC

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 6 00:48:21 PDT 2018


Author: sammccall
Date: Fri Apr  6 00:48:21 2018
New Revision: 329380

URL: http://llvm.org/viewvc/llvm-project?rev=329380&view=rev
Log:
[clangd] move comment to the right place. NFC

Modified:
    clang-tools-extra/trunk/clangd/ClangdUnit.cpp

Modified: clang-tools-extra/trunk/clangd/ClangdUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdUnit.cpp?rev=329380&r1=329379&r2=329380&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdUnit.cpp (original)
+++ clang-tools-extra/trunk/clangd/ClangdUnit.cpp Fri Apr  6 00:48:21 2018
@@ -219,6 +219,8 @@ namespace {
 
 SourceLocation getMacroArgExpandedLocation(const SourceManager &Mgr,
                                            const FileEntry *FE, Position Pos) {
+  // The language server protocol uses zero-based line and column numbers.
+  // Clang uses one-based numbers.
   SourceLocation InputLoc =
       Mgr.translateFileLineCol(FE, Pos.line + 1, Pos.character + 1);
   return Mgr.getMacroArgExpandedLocation(InputLoc);
@@ -469,9 +471,6 @@ CppFile::rebuildPreamble(CompilerInvocat
 SourceLocation clangd::getBeginningOfIdentifier(ParsedAST &Unit,
                                                 const Position &Pos,
                                                 const FileEntry *FE) {
-  // The language server protocol uses zero-based line and column numbers.
-  // Clang uses one-based numbers.
-
   const ASTContext &AST = Unit.getASTContext();
   const SourceManager &SourceMgr = AST.getSourceManager();
 




More information about the cfe-commits mailing list