Add @encode support for complex types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68729 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index e976ccf..deeb763 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -2266,8 +2266,11 @@
     
       S += encoding;
     }
-  }
-  else if (T->isObjCQualifiedIdType()) {
+  } else if (const ComplexType *CT = T->getAsComplexType()) {
+    S += 'j';
+    getObjCEncodingForTypeImpl(CT->getElementType(), S, false, false, 0, false, 
+                               false);
+  } else if (T->isObjCQualifiedIdType()) {
     getObjCEncodingForTypeImpl(getObjCIdType(), S, 
                                ExpandPointedToStructures,
                                ExpandStructures, FD);