Fix crash w/BlockDecl and invalid qualified decl.

I'm not really satisfied with the ad-hoc nature of
Sema::diagnoseQualifiedDeclaration, but I'm not sure how to fix it.

Fixes <rdar://problem/14639501>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188208 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp
index 40e7e07..572e479 100644
--- a/test/SemaCXX/nested-name-spec.cpp
+++ b/test/SemaCXX/nested-name-spec.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify %s 
+// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify -fblocks %s 
 namespace A {
   struct C {
     static int cx;
@@ -50,6 +50,7 @@
 
 void f1() {
   void A::Af(); // expected-error {{definition or redeclaration of 'Af' not allowed inside a function}}
+  void (^x)() = ^{ void A::Af(); }; // expected-error {{definition or redeclaration of 'Af' not allowed inside a block}}
 }
 
 void f2() {