[PATCH] D84297: [clangd] Fix Origin and MainFileOnly-ness for macros
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 22 02:10:44 PDT 2020
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
thanks!
the test.h in the patch description is missing a `#define X`.
================
Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:383
+ !isHeaderFile(SM.getFileEntryForID(SM.getMainFileID())->getName(),
+ ASTCtx->getLangOpts());
----------------
nit: move this var to Line 398, in some cases (builtin macros), it is not used, so would save some cost.
this is duplicated with the one in `handleDeclOccurrence`, creating a new function seems not worthy...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84297/new/
https://reviews.llvm.org/D84297
More information about the cfe-commits
mailing list