r209190 - Fix diagnostic message for member function pointer mismatches where one of the
Richard Trieu
rtrieu at google.com
Tue May 20 16:24:05 PDT 2014
Sorry about that. Looks like this got fixed in r209212
On Tue, May 20, 2014 at 6:22 AM, Aaron Ballman <aaron at aaronballman.com>wrote:
> Your test is causing some build failures.
>
> http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/8618
>
> I can also reproduce locally. It looks like with the MSVC build, the
> implicit thiscall attribute is being printed out with the diagnostic.
>
> ~Aaron
>
> On Tue, May 20, 2014 at 12:10 AM, Richard Trieu <rtrieu at google.com> wrote:
> > Author: rtrieu
> > Date: Mon May 19 23:10:24 2014
> > New Revision: 209190
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=209190&view=rev
> > Log:
> > Fix diagnostic message for member function pointer mismatches where one
> of the
> > classes is a template argument.
> >
> > Modified:
> > cfe/trunk/lib/Sema/SemaOverload.cpp
> > cfe/trunk/test/SemaCXX/err_init_conversion_failed.cpp
> >
> > Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=209190&r1=209189&r2=209190&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
> > +++ cfe/trunk/lib/Sema/SemaOverload.cpp Mon May 19 23:10:24 2014
> > @@ -2526,7 +2526,8 @@ void Sema::HandleFunctionTypeMismatch(Pa
> > if (FromType->isMemberPointerType() && ToType->isMemberPointerType())
> {
> > const MemberPointerType *FromMember =
> FromType->getAs<MemberPointerType>(),
> > *ToMember =
> ToType->getAs<MemberPointerType>();
> > - if (FromMember->getClass() != ToMember->getClass()) {
> > + if (FromMember->getClass()->getCanonicalTypeInternal() !=
> > + ToMember->getClass()->getCanonicalTypeInternal()) {
> > PDiag << ft_different_class << QualType(ToMember->getClass(), 0)
> > << QualType(FromMember->getClass(), 0);
> > return;
> >
> > Modified: cfe/trunk/test/SemaCXX/err_init_conversion_failed.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/err_init_conversion_failed.cpp?rev=209190&r1=209189&r2=209190&view=diff
> >
> ==============================================================================
> > --- cfe/trunk/test/SemaCXX/err_init_conversion_failed.cpp (original)
> > +++ cfe/trunk/test/SemaCXX/err_init_conversion_failed.cpp Mon May 19
> 23:10:24 2014
> > @@ -43,3 +43,19 @@ void test14(const float2 in, const float
> > const float4 V = (float4){ in, out };
> > // expected-error at -1{{cannot initialize a compound literal
> initializer}}
> > }
> > +
> > +namespace template_test {
> > +class S {
> > +public:
> > + void foo(int);
> > +};
> > +
> > +template <class P> struct S2 {
> > + void (P::*a)(const int &);
> > +};
> > +
> > +void test_15() {
> > + S2<S> X = {&S::foo};
> > + // expected-error at -1{{cannot initialize a member subobject of type
> 'void (template_test::S::*)(const int &)' with an rvalue of type 'void
> (template_test::S::*)(int)': type mismatch at 1st parameter ('const int &'
> vs 'int')}}
> > +}
> > +}
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140520/7b6d58aa/attachment.html>
More information about the cfe-commits
mailing list