Turns out that Sebastian already implemented the logic to compute the
composite pointer type, and his is better! Updated relational- and
equality-operator checking accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70963 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index a4eeb9f..d2833bc 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -3771,7 +3771,7 @@
       //
       // C++ [expr.eq]p2 uses the same notion for (in)equality
       // comparisons of pointers.
-      QualType T = CompositePointerType(lex, rex, LHSIsNull, RHSIsNull);
+      QualType T = FindCompositePointerType(lex, rex);
       if (T.isNull()) {
         Diag(Loc, diag::err_typecheck_comparison_of_distinct_pointers)
           << lType << rType << lex->getSourceRange() << rex->getSourceRange();