[PATCH] [ms] Do lookup in dependent base classes also when overload resolution fails (PR23810)
Hans Wennborg
hans at chromium.org
Wed Jun 10 15:50:07 PDT 2015
Hi rnk, rsmith,
This patch does two things in order to enable compilation of the problematic code in PR23810:
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.
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.
Please take a look!
http://reviews.llvm.org/D10369
Files:
lib/Sema/SemaOverload.cpp
test/SemaTemplate/ms-lookup-template-base-classes.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10369.27468.patch
Type: text/x-patch
Size: 4648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150610/70aea0d6/attachment.bin>
More information about the cfe-commits
mailing list