[cfe-commits] r160455 - /cfe/trunk/test/PCH/cxx-typeid.cpp

Richard Smith richard at metafoo.co.uk
Wed Jul 18 15:45:45 PDT 2012


On Wed, Jul 18, 2012 at 3:35 PM, Aaron Ballman <aaron at aaronballman.com>wrote:

> On Wed, Jul 18, 2012 at 5:07 PM, Richard Smith <richard at metafoo.co.uk>
> wrote:
> > On Wed, Jul 18, 2012 at 2:56 PM, Aaron Ballman <aaron at aaronballman.com>
> > wrote:
> >>
> >> Author: aaronballman
> >> Date: Wed Jul 18 16:56:43 2012
> >> New Revision: 160455
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=160455&view=rev
> >> Log:
> >> Fixing up a test case that was failing due to the lack of -std=c++11
> >
> >
> > What was the failure? This testcase doesn't seem to have anything to do
> with
> > C++11, and had been unchanged for ~2 years.
>
> I'm still not certain why this is different, but this test case used
> to pass on Windows when run from vanilla cmd.exe, and now it's stopped
> (though it does run fine from a VS 2010 command prompt).  The problem
> is a string of errors dealing with auto:
>
> Command 0 Stderr:
> error: 'error' diagnostics seen but not expected:
>   Line 414: 'auto' not allowed in function return type
>   Line 414: expected ';' at end of declaration list
>   Line 414: 'auto' not allowed in function return type
>   Line 414: expected ';' at end of declaration list
>   Line 414: expected parameter declarator
>   Line 414: expected ')'
>   Line 414: '_Fn' cannot be the name of a parameter
>   Line 414: expected ';' at end of declaration list
>   Line 197: use of undeclared identifier 'static_assert'; did you mean
> 'static_c
> ast'?
>   Line 214: use of undeclared identifier 'static_assert'; did you mean
> 'static_c
> ast'?
>   Line 238: expected parameter declarator
>   Line 238: expected ')'
>   Line 442: function definition does not declare parameters
>   Line 488: no viable conversion from 'int' to 'std::exception_ptr'
>   Line 527: unknown type name 'nullptr_t'
>   Line 532: unknown type name 'nullptr_t'
> error: 'note' diagnostics seen but not expected:
>   Line 414: to match this '('
>   Line 237: to match this '('
>   Line 450: candidate constructor not viable: no known conversion from
> 'int' to
> 'const std::exception_ptr &' for 1st argument
> 19 errors generated.
>
> So I do agree that the -std=c++11 change isn't a good fix (I'll back
> it out), but I'm stumped as to why this has suddenly stopped working
> when it was previously fine.


This test indirectly includes <typeinfo>. Presumably your system now has a
<typeinfo> which requires C++11. I'm surprised you don't also see failures
in the 8 tests in test/CodeGenCXX which include <typeinfo>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120718/a32b0f54/attachment.html>


More information about the cfe-commits mailing list