]> granicus.if.org Git - clang/commit
Pull Sema::isAcceptableLookupResult into SemaLookup. Extract the criteria into
authorJohn McCall <rjmccall@apple.com>
Fri, 18 Dec 2009 10:40:03 +0000 (10:40 +0000)
committerJohn McCall <rjmccall@apple.com>
Fri, 18 Dec 2009 10:40:03 +0000 (10:40 +0000)
commit1d7c52803e49d651a66cee782e264f62078c1da5
treea83ad8ede2d42fb50c04a369039ace4f7bf72b5f
parent38b48afd338d494099697d2611e1f45e558e469e
Pull Sema::isAcceptableLookupResult into SemaLookup.  Extract the criteria into
different functions and pick the function at lookup initialization time.
In theory we could actually divide the criteria functions into N different
functions for the N cases, but it's so not worth it.

Among other things, lets us invoke LookupQualifiedName without recomputing
IDNS info every time.

Do some refactoring in SemaDecl to avoid an awkward special case in LQN
that was only necessary for redeclaration testing for anonymous structs/unions ---
which could be done more efficiently with a scoped lookup anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91676 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/Lookup.h
lib/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaLookup.cpp
test/SemaCXX/nested-name-spec.cpp