Ensure code complete with !LoadExternal sees all local decls.
authorSam McCall <sam.mccall@gmail.com>
Tue, 16 Jan 2018 12:33:46 +0000 (12:33 +0000)
committerSam McCall <sam.mccall@gmail.com>
Tue, 16 Jan 2018 12:33:46 +0000 (12:33 +0000)
commit091b1efafb93a59ee0bb274e4ca012a673059b0b
tree5ea95514e5130375b070174c60f67f3a0659ac13
parent2c3849af22be0afbfefe9d096a2c51a5913d53a6
Ensure code complete with !LoadExternal sees all local decls.

Summary:
noload_lookups() was too lazy: in addition to avoiding external decls, it
avoided populating the lazy lookup structure for internal decls.
This is the right behavior for the existing callsite in ASTDumper, but I think
it's not a very useful default, so we populate it by default.

While here:
 - remove an unused test file accidentally added in r322371.
 - remove lookups_begin()/lookups_end() in favor of lookups().begin(), which is
   more common and more efficient.

Reviewers: ilya-biryukov

Subscribers: cfe-commits, rsmith

Differential Revision: https://reviews.llvm.org/D42077

llvm-svn: 322548
clang/include/clang/AST/DeclBase.h
clang/include/clang/AST/DeclLookups.h
clang/lib/AST/ASTDumper.cpp
clang/lib/AST/DeclBase.cpp
clang/lib/Sema/SemaLookup.cpp
clang/test/Index/complete-pch-skip.cpp
clang/test/Index/complete-pch-skip.h [deleted file]