Rework Sema::CheckConditionalOperands(). No functionality change.

This was necessary to simplify some other changes I'm making (wrt ObjC type cleanups).

The idea is to separate the constraint checks for block pointers, ObjC pointers, and C pointers (the previous code combined them into one clause).

Note: This routine will be further simplified when I integrate the ObjC type cleanups (forthcoming).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74604 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index eaa7d3b..4e061a9 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -185,6 +185,12 @@
     return RT->getDecl()->isStruct();
   return false;
 }
+bool Type::isVoidPointerType() const {
+  if (const PointerType *PT = getAsPointerType())
+    return PT->getPointeeType()->isVoidType();
+  return false;
+}
+
 bool Type::isUnionType() const {
   if (const RecordType *RT = getAsRecordType())
     return RT->getDecl()->isUnion();