diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-02-17 20:09:39 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2015-02-17 20:09:39 +0000 |
commit | f91435e16dc3ce432200181f4c5f32c10ec5ec82 (patch) | |
tree | 987e2a055ed6680aef96ae3caa672c19a0823d7b | |
parent | b811c1d6a57beae697be440144b9f8b8b33e0605 (diff) | |
download | bcm5719-llvm-f91435e16dc3ce432200181f4c5f32c10ec5ec82.tar.gz bcm5719-llvm-f91435e16dc3ce432200181f4c5f32c10ec5ec82.zip |
Remove a recovery attempt that was untested and crashed when used.
Found by SLi's bot.
llvm-svn: 229532
-rw-r--r-- | clang/lib/Sema/SemaType.cpp | 8 | ||||
-rw-r--r-- | clang/test/SemaCXX/member-pointer.cpp | 1 |
2 files changed, 2 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 8e86c73ccbe..56142253a08 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -1810,13 +1810,7 @@ QualType Sema::BuildMemberPointerType(QualType T, QualType Class, // 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 diff --git a/clang/test/SemaCXX/member-pointer.cpp b/clang/test/SemaCXX/member-pointer.cpp index b9e5a631baa..afb7455921e 100644 --- a/clang/test/SemaCXX/member-pointer.cpp +++ b/clang/test/SemaCXX/member-pointer.cpp @@ -12,6 +12,7 @@ class H : A {}; // expected-note 2{{implicitly declared private here}} 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}} |