Implement template instantiation for several more kinds of expressions:
  - C++ function casts, e.g., T(foo)
  - sizeof(), alignof()

More importantly, this allows us to verify that we're performing
overload resolution during template instantiation, with
argument-dependent lookup and the "cached" results of name lookup from
the template definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66947 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp
index 4a90edd..78366a1 100644
--- a/lib/AST/StmtSerialization.cpp
+++ b/lib/AST/StmtSerialization.cpp
@@ -832,9 +832,14 @@
   QualType Res = QualType::ReadVal(D);
   SourceLocation OpLoc = SourceLocation::ReadVal(D);
   SourceLocation RParenLoc = SourceLocation::ReadVal(D);
-  
-  return new SizeOfAlignOfExpr(isSizeof, isType, Argument, Res,
-                               OpLoc, RParenLoc);
+
+  if (isType)
+    return new (C) SizeOfAlignOfExpr(isSizeof, 
+                                     QualType::getFromOpaquePtr(Argument),
+                                     Res, OpLoc, RParenLoc);
+
+  return new (C) SizeOfAlignOfExpr(isSizeof, (Expr *)Argument,
+                                   Res, OpLoc, RParenLoc);
 }
 
 void StmtExpr::EmitImpl(Serializer& S) const {