[llvm-branch-commits] [cfe-branch] r156672 - in /cfe/branches/release_31: ./ lib/Parse/ParseDecl.cpp test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp test/SemaCXX/dependent-noexcept-unevaluated.cpp test/SemaCXX/implicit-exception-spec.cpp test/SemaCXX/warn-unreachable.cpp

Bill Wendling isanbard at gmail.com
Fri May 11 17:19:22 PDT 2012


Author: void
Date: Fri May 11 19:19:22 2012
New Revision: 156672

URL: http://llvm.org/viewvc/llvm-project?rev=156672&view=rev
Log:
Merging r155975:
------------------------------------------------------------------------
r155975 | rsmith | 2012-05-01 18:29:43 -0700 (Tue, 01 May 2012) | 4 lines

Disable our non-standard delayed parsing of exception specifications. Delaying
the parsing of such things appears to be a conforming extension, but it breaks
libstdc++4.7's std::pair.

------------------------------------------------------------------------

Modified:
    cfe/branches/release_31/   (props changed)
    cfe/branches/release_31/lib/Parse/ParseDecl.cpp
    cfe/branches/release_31/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
    cfe/branches/release_31/test/SemaCXX/dependent-noexcept-unevaluated.cpp
    cfe/branches/release_31/test/SemaCXX/implicit-exception-spec.cpp
    cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp   (props changed)

Propchange: cfe/branches/release_31/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 11 19:19:22 2012
@@ -1,3 +1,3 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:155076,155278-155279,155342,155534-155535,155576,155670,155728,155803,155860,156322
+/cfe/trunk:155076,155278-155279,155342,155534-155535,155576,155670,155728,155803,155860,155975,156322
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_31/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/lib/Parse/ParseDecl.cpp?rev=156672&r1=156671&r2=156672&view=diff
==============================================================================
--- cfe/branches/release_31/lib/Parse/ParseDecl.cpp (original)
+++ cfe/branches/release_31/lib/Parse/ParseDecl.cpp Fri May 11 19:19:22 2012
@@ -4266,10 +4266,16 @@
                                IsCXX11MemberFunction);
       
       // Parse exception-specification[opt].
+      // FIXME: Remove the code to perform delayed parsing of exception
+      //        specifications.
+#if 0
       bool Delayed = (D.getContext() == Declarator::MemberContext &&
                       D.getDeclSpec().getStorageClassSpec()
                         != DeclSpec::SCS_typedef &&
                       !D.getDeclSpec().isFriendSpecified());
+#else
+      const bool Delayed = false;
+#endif
       ESpecType = tryParseExceptionSpecification(Delayed,
                                                  ESpecRange,
                                                  DynamicExceptions,

Modified: cfe/branches/release_31/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp?rev=156672&r1=156671&r2=156672&view=diff
==============================================================================
--- cfe/branches/release_31/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp (original)
+++ cfe/branches/release_31/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp Fri May 11 19:19:22 2012
@@ -91,10 +91,11 @@
 
 namespace PR12564 {
   struct Base {
-    void bar(Base&) {}
+    void bar(Base&) {} // unexpected-note {{here}}
   };
 
   struct Derived : Base {
-    void foo(Derived& d) noexcept(noexcept(d.bar(d))) {}
+    // FIXME: This should be accepted.
+    void foo(Derived& d) noexcept(noexcept(d.bar(d))) {} // unexpected-error {{cannot bind to a value of unrelated type}}
   };
 }

Modified: cfe/branches/release_31/test/SemaCXX/dependent-noexcept-unevaluated.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/test/SemaCXX/dependent-noexcept-unevaluated.cpp?rev=156672&r1=156671&r2=156672&view=diff
==============================================================================
--- cfe/branches/release_31/test/SemaCXX/dependent-noexcept-unevaluated.cpp (original)
+++ cfe/branches/release_31/test/SemaCXX/dependent-noexcept-unevaluated.cpp Fri May 11 19:19:22 2012
@@ -23,7 +23,7 @@
 {
     T data[N];
 
-  void swap(array& a) noexcept(noexcept(::swap(declval<T&>(), declval<T&>())));
+    void swap(array& a) noexcept(noexcept(swap(declval<T&>(), declval<T&>())));
 };
 
 struct DefaultOnly
@@ -38,4 +38,3 @@
 {
     array<DefaultOnly, 1> a, b;
 }
-

Modified: cfe/branches/release_31/test/SemaCXX/implicit-exception-spec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/test/SemaCXX/implicit-exception-spec.cpp?rev=156672&r1=156671&r2=156672&view=diff
==============================================================================
--- cfe/branches/release_31/test/SemaCXX/implicit-exception-spec.cpp (original)
+++ cfe/branches/release_31/test/SemaCXX/implicit-exception-spec.cpp Fri May 11 19:19:22 2012
@@ -40,9 +40,12 @@
 }
 
 namespace ExceptionSpecification {
-  struct Nested {
+  // A type is permitted to be used in a dynamic exception specification when it
+  // is still being defined, but isn't complete within such an exception
+  // specification.
+  struct Nested { // expected-note {{not complete}}
     struct T {
-      T() noexcept(!noexcept(Nested())); // expected-error{{exception specification is not available until end of class definition}}
+      T() noexcept(!noexcept(Nested())); // expected-error{{incomplete type}}
     } t;
   };
 }

Propchange: cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 11 19:19:22 2012
@@ -1,2 +1,2 @@
 /cfe/branches/type-system-rewrite/test/SemaCXX/warn-unreachable.cpp:134693-134817
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155342,155534-155535,155576,155670,155728,155803,155860
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155342,155534-155535,155576,155670,155728,155803,155860,155975





More information about the llvm-branch-commits mailing list