Give a more informative error message when the dot or arrow operator is used
on a type.  Currently, it gives a generic "expected unqualified-id" error.
The new error message is "cannot use (dot|arrow) operator on a type".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173556 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp
index ee292fd..71fd7aa 100644
--- a/test/Parser/cxx-decl.cpp
+++ b/test/Parser/cxx-decl.cpp
@@ -162,6 +162,24 @@
 
 }
 
+struct DIE {
+  void foo() {}
+};
+
+void test (DIE die, DIE *Die, DIE INT, DIE *FLOAT) {
+  DIE.foo();  // expected-error {{cannot use dot operator on a type}}
+  die.foo();
+
+  DIE->foo();  // expected-error {{cannot use arrow operator on a type}}
+  Die->foo();
+
+  int.foo();  // expected-error {{cannot use dot operator on a type}}
+  INT.foo();
+
+  float->foo();  // expected-error {{cannot use arrow operator on a type}}
+  FLOAT->foo();
+}
+
 // PR8380
 extern ""      // expected-error {{unknown linkage language}}
 test6a { ;// expected-error {{C++ requires a type specifier for all declarations}} \