r229532 - Remove a recovery attempt that was untested and crashed when used.

Nico Weber nicolasweber at gmx.de
Tue Feb 17 12:09:40 PST 2015


Author: nico
Date: Tue Feb 17 14:09:39 2015
New Revision: 229532

URL: http://llvm.org/viewvc/llvm-project?rev=229532&view=rev
Log:
Remove a recovery attempt that was untested and crashed when used.

Found by SLi's bot.

Modified:
    cfe/trunk/lib/Sema/SemaType.cpp
    cfe/trunk/test/SemaCXX/member-pointer.cpp

Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=229532&r1=229531&r2=229532&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Tue Feb 17 14:09:39 2015
@@ -1810,13 +1810,7 @@ QualType Sema::BuildMemberPointerType(Qu
   // exception specification.
   if (CheckDistantExceptionSpec(T)) {
     Diag(Loc, diag::err_distant_exception_spec);
-
-    // FIXME: If we're doing this as part of template instantiation,
-    // we should return immediately.
-
-    // Build the type anyway, but use the canonical type so that the
-    // exception specifiers are stripped off.
-    T = Context.getCanonicalType(T);
+    return QualType();
   }
 
   // C++ 8.3.3p3: A pointer to member shall not point to ... a member

Modified: cfe/trunk/test/SemaCXX/member-pointer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/member-pointer.cpp?rev=229532&r1=229531&r2=229532&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/member-pointer.cpp (original)
+++ cfe/trunk/test/SemaCXX/member-pointer.cpp Tue Feb 17 14:09:39 2015
@@ -12,6 +12,7 @@ class H : A {}; // expected-note 2{{impl
 int A::*pdi1;
 int (::A::*pdi2);
 int (A::*pfi)(int);
+void (*A::*ppfie)() throw(); // expected-error {{exception specifications are not allowed beyond a single level of indirection}}
 
 int B::*pbi; // expected-warning{{use of enumeration in a nested name specifier is a C++11 extension}} \
              // expected-error {{'pbi' does not point into a class}}





More information about the cfe-commits mailing list