diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-13 21:01:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-13 21:01:28 +0000 |
commit | ba49817c5b9f502602672861cf369fd0e53966e8 (patch) | |
tree | 678a82159237ffb3de940bf8d19e67c9641ddba7 /lib/AST/StmtSerialization.cpp | |
parent | e8463ef889be035312c2e40fa318bbbcfce02a3e (diff) |
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
Diffstat (limited to 'lib/AST/StmtSerialization.cpp')
-rw-r--r-- | lib/AST/StmtSerialization.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp index 4a90edd7a1..78366a1514 100644 --- a/lib/AST/StmtSerialization.cpp +++ b/lib/AST/StmtSerialization.cpp @@ -832,9 +832,14 @@ SizeOfAlignOfExpr::CreateImpl(Deserializer& D, ASTContext& C) { 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 { |