[PATCH] D41989: [CodeComplete] Add an option to omit results from the preamble.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 12 06:05:02 PST 2018


sammccall added a comment.

This is basically all plumbing, so I've marked the two lines that actually do something :-)



================
Comment at: lib/Sema/SemaLookup.cpp:3517
     // Ensure all external identifiers are in the identifier table.
-    if (IdentifierInfoLookup *External = Idents.getExternalIdentifierLookup()) {
-      std::unique_ptr<IdentifierIterator> Iter(External->getIdentifiers());
-      for (StringRef Name = Iter->Next(); !Name.empty(); Name = Iter->Next())
-        Idents.get(Name);
-    }
+    if (Load)
+      if (IdentifierInfoLookup *External = Idents.getExternalIdentifierLookup()) {
----------------
here's a substantive change


================
Comment at: lib/Sema/SemaLookup.cpp:3546
+  for (DeclContextLookupResult R :
+       Load ? Ctx->lookups() : Ctx->noload_lookups()) {
     for (auto *D : R) {
----------------
here's a substantive change


Repository:
  rC Clang

https://reviews.llvm.org/D41989





More information about the cfe-commits mailing list