This and r155424 fix recent regressions (and r155424 is apparently necessary for stlport to build). Requesting backport!
On Mon, Apr 23, 2012 at 10:48 PM, Richard Smith <[email protected]>wrote: > Author: rsmith > Date: Tue Apr 24 00:48:42 2012 > New Revision: 155426 > > URL: http://llvm.org/viewvc/llvm-project?rev=155426&view=rev > Log: > Don't try to delay parsing the exception specification for a data member > of a > class; we would never actually parse it and attach it to the type. > > Modified: > cfe/trunk/lib/Parse/ParseDecl.cpp > cfe/trunk/test/CXX/class/class.mem/p2.cpp > > Modified: cfe/trunk/lib/Parse/ParseDecl.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=155426&r1=155425&r2=155426&view=diff > > ============================================================================== > --- cfe/trunk/lib/Parse/ParseDecl.cpp (original) > +++ cfe/trunk/lib/Parse/ParseDecl.cpp Tue Apr 24 00:48:42 2012 > @@ -4270,6 +4270,8 @@ > D.getDeclSpec().getStorageClassSpec() > != DeclSpec::SCS_typedef && > !D.getDeclSpec().isFriendSpecified()); > + for (unsigned i = 0, e = D.getNumTypeObjects(); Delayed && i != e; > ++i) > + Delayed &= D.getTypeObject(i).Kind == DeclaratorChunk::Paren; > ESpecType = tryParseExceptionSpecification(Delayed, > ESpecRange, > DynamicExceptions, > > Modified: cfe/trunk/test/CXX/class/class.mem/p2.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/class/class.mem/p2.cpp?rev=155426&r1=155425&r2=155426&view=diff > > ============================================================================== > --- cfe/trunk/test/CXX/class/class.mem/p2.cpp (original) > +++ cfe/trunk/test/CXX/class/class.mem/p2.cpp Tue Apr 24 00:48:42 2012 > @@ -60,8 +60,16 @@ > namespace PR12629 { > struct S { > static int (f)() throw(); > - static int ((((((g))))() throw(int))); > + static int ((((((g))))() throw(U))); > + int (*h)() noexcept(false); > + static int (&i)() noexcept(true); > + static int (*j)() throw(U); // expected-error {{type name}} \ > + // expected-error {{expected ')'}} expected-note {{to match}} > + > + struct U {}; > }; > static_assert(noexcept(S::f()), ""); > static_assert(!noexcept(S::g()), ""); > + static_assert(!noexcept(S().h()), ""); > + static_assert(noexcept(S::i()), ""); > } > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
