Template instantiation for imaginary literals, because they were next in Expr.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72058 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 19ab835..6bafdf2 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -44,6 +44,16 @@
   return new (C) FloatingLiteral(Value, &exact, getType(), Loc);
 }
 
+ImaginaryLiteral* ImaginaryLiteral::Clone(ASTContext &C) const {
+  // FIXME: Use virtual Clone(), once it is available
+  Expr *ClonedVal = 0;
+  if (const IntegerLiteral *IntLit = dyn_cast<IntegerLiteral>(Val))
+    ClonedVal = IntLit->Clone(C);
+  else
+    ClonedVal = cast<FloatingLiteral>(Val)->Clone(C);
+  return new (C) ImaginaryLiteral(ClonedVal, getType());
+}
+
 GNUNullExpr* GNUNullExpr::Clone(ASTContext &C) const {
   return new (C) GNUNullExpr(getType(), TokenLoc);
 }