Fix infinite loop during error diagnostics. Fixes rdar://8875304.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124243 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/arrow-operator.cpp b/test/SemaCXX/arrow-operator.cpp
index 29b23ed..6535a0a 100644
--- a/test/SemaCXX/arrow-operator.cpp
+++ b/test/SemaCXX/arrow-operator.cpp
@@ -23,3 +23,16 @@
d->f();
e->f(); // expected-error{{incomplete definition of type}}
}
+
+// rdar://8875304
+namespace rdar8875304 {
+class Point {};
+class Line_Segment{ public: Line_Segment(const Point&){} };
+class Node { public: Point Location(){ Point p; return p; } };
+
+void f()
+{
+ Node** node1;
+ Line_Segment(node1->Location()); // expected-error {{not a structure or union}}
+}
+}