More type checking for blocks. Still incomplete (will hopefully finish up this weekend).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55862 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 4caf16c..62364ba 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -1781,7 +1781,19 @@
 //===----------------------------------------------------------------------===//
 
 /// typesAreBlockCompatible - This routine is called when comparing two
-/// block types. Types must be strictly compatible here.
+/// block types. Types must be strictly compatible here. For example,
+/// C unfortunately doesn't produce an error for the following:
+/// 
+///   int (*emptyArgFunc)();
+///   int (*intArgList)(int) = emptyArgFunc;
+/// 
+/// For blocks, we will produce an error for the following (similar to C++):
+///
+///   int (^emptyArgBlock)();
+///   int (^intArgBlock)(int) = emptyArgBlock;
+///
+/// FIXME: When the dust settles on this integration, fold this into mergeTypes.
+///
 bool ASTContext::typesAreBlockCompatible(QualType lhs, QualType rhs) {
   if (lhs.getCVRQualifiers() != rhs.getCVRQualifiers())
     return false;