]> granicus.if.org Git - clang/commit
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)
commit5e98234926a3fb1da12381a05fbdcdff4935f66f
treef293d0c91d3bd246cae3a5a0c55b40ce5112af75
parent052acd24d4a8cde95eaf2c6f5c3563123ffae1a9
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322548 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/DeclBase.h
include/clang/AST/DeclLookups.h
lib/AST/ASTDumper.cpp
lib/AST/DeclBase.cpp
lib/Sema/SemaLookup.cpp
test/Index/complete-pch-skip.cpp
test/Index/complete-pch-skip.h [deleted file]