[cfe-commits] r128158 - /cfe/trunk/test/SemaCXX/ptrtomember.cpp

Clow, Marshall mclow at qualcomm.com
Thu Mar 24 08:44:51 PDT 2011


On Mar 23, 2011, at 1:55 PM, Andrew Trick wrote:

> Hi Marshall,
> 
> Clang :: SemaCXX/ptrtomember.cpp is failing on clang-x86_64-darwin10-gcc42-RA with this output:
> 
> ******************** TEST 'Clang :: SemaCXX/ptrtomember.cpp' FAILED ********************Script:
> --
> /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-gcc42-RA/clang-build/Release+Asserts/bin/clang -cc1 -fsyntax-only -verify /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.clang-x86_64-darwin10-gcc42-RA/llvm/tools/clang/test/SemaCXX/ptrtomember.cpp -std=c++0x
> --
> Exit Code: 1
> Command Output (stderr):
> --
> error: 'error' diagnostics expected but not seen:
>  Line 30: a bound member function may only be called
>  Line 32: a bound member function may only be called
> error: 'error' diagnostics seen but not expected:
>  Line 30: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'bool'
> 3 errors generated.

Andrew --

Yes, the test now fails.

That is bug number #8793 <http://llvm.org/bugs/show_bug.cgi?id=8793>
What I did was add a test that tickles the bug.

-- Marshall




> --
> 
> ********************
> 
> -Andy
> 
> On Mar 23, 2011, at 12:44 PM, Marshall Clow wrote:
> 
>> Author: marshall
>> Date: Wed Mar 23 14:44:36 2011
>> New Revision: 128158
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=128158&view=rev
>> Log:
>> Add a test for !ptr-to-member (should fail)
>> 
>> Modified:
>>   cfe/trunk/test/SemaCXX/ptrtomember.cpp
>> 
>> Modified: cfe/trunk/test/SemaCXX/ptrtomember.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/ptrtomember.cpp?rev=128158&r1=128157&r2=128158&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/SemaCXX/ptrtomember.cpp (original)
>> +++ cfe/trunk/test/SemaCXX/ptrtomember.cpp Wed Mar 23 14:44:36 2011
>> @@ -27,6 +27,7 @@
>>    (void)(void*)(p->*m); // expected-error {{a bound member function may only be called}}
>>    (void)reinterpret_cast<void*>(p->*m); // expected-error {{a bound member function may only be called}}
>>    if (p->*m) {} // expected-error {{a bound member function may only be called}}
>> -
>> -    p->m; // expected-error {{a bound member function may only be called}}
>> +    if (!p->*m) {} // expected-error {{a bound member function may only be called}}
>> +    if (p->m) {}; // expected-error {{a bound member function may only be called}}
>> +    if (!p->m) {}; // expected-error {{a bound member function may only be called}}
>> }
>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 





More information about the cfe-commits mailing list