Reject virt-specifiers on friend declarations. Give anonymous bitfields a
location so their diagnostics have somewhere to point.

llvm-svn: 215416
diff --git a/clang/test/Parser/cxx-class.cpp b/clang/test/Parser/cxx-class.cpp
index 80cd828..8698454 100644
--- a/clang/test/Parser/cxx-class.cpp
+++ b/clang/test/Parser/cxx-class.cpp
@@ -139,6 +139,16 @@
   };
 }
 
+namespace BadFriend {
+  struct A {
+    friend int : 3; // expected-error {{friends can only be classes or functions}}
+    friend void f() = 123; // expected-error {{illegal initializer}}
+    friend virtual void f(); // expected-error {{'virtual' is invalid in friend declarations}}
+    friend void f() final; // expected-error {{'final' is invalid in friend declarations}}
+    friend void f() override; // expected-error {{'override' is invalid in friend declarations}}
+  };
+}
+
 // PR11109 must appear at the end of the source file
 class pr11109r3 { // expected-note{{to match this '{'}}
   public // expected-error{{expected ':'}} expected-error{{expected '}'}} expected-error{{expected ';' after class}}