[PATCH] D42077: Ensure code complete with !LoadExternal sees all local decls.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 16 03:16:12 PST 2018
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM with a few NITs (see the comments)
================
Comment at: include/clang/AST/DeclBase.h:1826
lookups_range lookups() const;
- lookups_range noload_lookups() const;
+ lookups_range noload_lookups(bool PreserveInternalState = false) const;
----------------
Maybe we should consider removing the default argument and specifying it explicitly at each call site?
The difference seems subtle enough to not leave it out in the callers of the function.
================
Comment at: include/clang/AST/DeclLookups.h:89
-inline DeclContext::all_lookups_iterator DeclContext::lookups_begin() const {
- return lookups().begin();
-}
-
-inline DeclContext::all_lookups_iterator DeclContext::lookups_end() const {
- return lookups().end();
-}
-
-inline DeclContext::lookups_range DeclContext::noload_lookups() const {
+// Like lookups(), but avoids loading external declarations.
+// If PreserveInternalState, avoids building lookup data structures too.
----------------
Maybe move the doc to the declaration site?
Or is it common in these files to put comments at the definition?
Repository:
rC Clang
https://reviews.llvm.org/D42077
More information about the cfe-commits
mailing list