self-referecing operator '->' member function was causing
infinit recursion. This patch fixes it. [13.3.1.2]-p2



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83124 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 3ca8849..fc32c3b 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -1982,6 +1982,11 @@
       BaseExpr = (Expr*)Base.get();
       if (BaseExpr == NULL)
         return ExprError();
+      if (Context.getCanonicalType(BaseExpr->getType()) == 
+          Context.getCanonicalType(BaseType)) {
+        Diag(OpLoc, diag::err_operator_arrow_circular);
+        return ExprError();
+      }
       BaseType = BaseExpr->getType();
     }
   }