]> granicus.if.org Git - clang/commit
[ms] Do lookup in dependent base classes also when overload resolution fails (PR23810)
authorHans Wennborg <hans@hanshq.net>
Thu, 11 Jun 2015 21:21:57 +0000 (21:21 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 11 Jun 2015 21:21:57 +0000 (21:21 +0000)
commit9f6e65403db1d44653708fb581b2a61479633b52
tree0237dbcfcf6cbc483c9424af95917334e0e25e13
parentf79457cdfed024771c15a8865cf79147cd9c7b31
[ms] Do lookup in dependent base classes also when overload resolution fails (PR23810)

This patch does two things in order to enable compilation of the problematic code in PR23810:

1. In Sema::buildOverloadedCallSet, it postpones lookup for MS mode when no
viable candidate is found in the overload set. Previously, lookup would only
be postponed here if the overload set was empty.

2. Make BuildRecoveryCallExpr call Sema::DiagnoseEmptyLookup under more circumstances.
There is a comment in DiagnoseTwoPhaseLookup that says "Don't diagnose names we find in
classes; we get much better diagnostics for these from DiagnoseEmptyLookup." The problem
was that DiagnoseEmptyLookup might not get called later, and we failed to recover.

Differential Revision: http://reviews.llvm.org/D10369

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239558 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaOverload.cpp
test/SemaTemplate/ms-lookup-template-base-classes.cpp