[PATCH] D75331: [clangd] Get rid of lexer usage in locateMacroAt

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 28 05:53:48 PST 2020


hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/SourceCode.h:285
 };
 /// Gets the macro at a specified \p Loc. It must be a spelling location and
 /// point to the beginning of identifier.
----------------
nit: update the comment.


================
Comment at: clang-tools-extra/clangd/SourceCode.h:287
 /// point to the beginning of identifier.
-llvm::Optional<DefinedMacro> locateMacroAt(SourceLocation Loc,
+llvm::Optional<DefinedMacro> locateMacroAt(const syntax::Token &Tok,
                                            Preprocessor &PP);
----------------
nit: would be clearer to name it `SpelledTok`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75331/new/

https://reviews.llvm.org/D75331





More information about the cfe-commits mailing list