[PATCH] D60937: [clangd] Fix code completion of macros defined in the preamble region of the main file.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 2 01:57:45 PDT 2019
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM.
I suggest considering a more direct way to solve the same problem: we could collect symbols for the main-file macros when building the preamble and store them in `PreambleData` (or somewhere else with the same lifetime).
I don't see any reasons why the current approach won't work, though, so looks ok too.
================
Comment at: unittests/clangd/CodeCompleteTests.cpp:2081
+ R"cpp(#include "foo.h"
+ define CLANGD_PREAMBLE_MAIN x
----------------
are we missing `#` here?
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60937/new/
https://reviews.llvm.org/D60937
More information about the cfe-commits
mailing list