sammccall accepted this revision.
sammccall added a comment.

Something not listed in cons: because macros aren't namespaced and we don't 
have lots of signals, they can be really spammy. 
Potentially, offering macros that aren't in the TU could be a loss even if it's 
a win for other types of signals.

We could always e.g. postfilter index macro results using the include structure 
of the preamble, so no concern for this patch, just something to think about 
for the followup.

We also need to make sure that we're not indexing/serving header guards as code 
completions (e.g. if SemaCodeComplete is currently taking care of this)



================
Comment at: clangd/index/FileIndex.cpp:48
     CollectorOpts.RefFilter = RefKind::All;
+  }else {
+    IndexOpts.IndexMacrosInPreprocessor = true;
----------------
nit: please clang-format


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52078



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATC... Eric Liu via Phabricator via cfe-commits
  • [PATC... Ilya Biryukov via Phabricator via cfe-commits
  • [PATC... Eric Liu via Phabricator via cfe-commits
  • [PATC... Ilya Biryukov via Phabricator via cfe-commits
  • [PATC... Eric Liu via Phabricator via cfe-commits
  • [PATC... Eric Liu via Phabricator via cfe-commits
  • [PATC... Sam McCall via Phabricator via cfe-commits
  • [PATC... Eric Liu via Phabricator via cfe-commits
    • ... Sam McCall via cfe-commits
  • [PATC... Eric Liu via Phabricator via cfe-commits
  • [PATC... Sam McCall via Phabricator via cfe-commits
  • [PATC... Eric Liu via Phabricator via cfe-commits
    • ... Sam McCall via cfe-commits
      • ... Mailing List "cfe-commits" via Phabricator via cfe-commits
  • [PATC... Eric Liu via Phabricator via cfe-commits

Reply via email to