[Sema] Refactor LookupVisibleDecls. NFC
authorIlya Biryukov <ibiryukov@google.com>
Thu, 5 Sep 2019 08:59:06 +0000 (08:59 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Thu, 5 Sep 2019 08:59:06 +0000 (08:59 +0000)
commitcac96e605787ca67a1c1e7226c8db1d90ea88b6b
tree79a40978372013c8bb5a918c7f704d22554c77f1
parente7b4d209987ab94f3ec8f88256257d02dff898a4
[Sema] Refactor LookupVisibleDecls. NFC

Summary:
We accumulated some configuration parameters for LookupVisibleDecls that
are being passed unchanged to recursive calls, e.g. LoadExternal and
IncludeDependentBases.

At the same time, there is a bunch of parameters that can change in the
recursive invocations.

It is hard to tell the difference between those groups, making the code
hard to follow.

This change introduces a helper struct and factors out the non-changing
bits into fields, making recursive calls in the implementation code easier
to read.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: riccibruno, doug.gregor, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 371032
clang/lib/Sema/SemaLookup.cpp