[PATCH] D60937: [clangd] Fix code completion of macros defined in the preamble region of the main file.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 20 10:18:57 PDT 2019


sammccall created this revision.
sammccall added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric.
Herald added a project: clang.

This is a tricky case (we baked the assumption that symbols come from
the preamble xor mainfile pretty deeply) and the fix is a bit of a hack:
We look at the code to guess the macro names, and deserialize them from
the preamble "by hand".


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D60937

Files:
  clangd/CodeComplete.cpp
  clangd/index/SymbolCollector.cpp
  unittests/clangd/CodeCompleteTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60937.195975.patch
Type: text/x-patch
Size: 6036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190420/f70eafad/attachment.bin>


More information about the cfe-commits mailing list