diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-08 00:15:04 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-08 00:15:04 +0000 |
commit | 2b88c115f9ecf2a01f5ca25e47e549718931268a (patch) | |
tree | 34fa1509b32c6cd19070d2afe992aef230df01a3 /clang/lib/Serialization/ASTReaderStmt.cpp | |
parent | d003a778d949c0a6d29a597634c1ffd3cfebb949 (diff) | |
download | bcm5719-llvm-2b88c115f9ecf2a01f5ca25e47e549718931268a.tar.gz bcm5719-llvm-2b88c115f9ecf2a01f5ca25e47e549718931268a.zip |
Provide proper type-source location information for
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.
llvm-svn: 113319
Diffstat (limited to 'clang/lib/Serialization/ASTReaderStmt.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderStmt.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index d3efc71c83b..8bfca9431dd 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -974,7 +974,7 @@ void ASTStmtReader::VisitCXXConstructExpr(CXXConstructExpr *E) { void ASTStmtReader::VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E) { VisitCXXConstructExpr(E); - E->TyBeginLoc = Reader.ReadSourceLocation(Record, Idx); + E->Type = Reader.GetTypeSourceInfo(DeclsCursor, Record, Idx); E->RParenLoc = Reader.ReadSourceLocation(Record, Idx); } @@ -1058,8 +1058,8 @@ void ASTStmtReader::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) { void ASTStmtReader::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) { VisitExpr(E); - E->setTypeBeginLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); - E->setRParenLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); + E->TypeInfo = Reader.GetTypeSourceInfo(DeclsCursor, Record, Idx); + E->RParenLoc = SourceLocation::getFromRawEncoding(Record[Idx++]); } void ASTStmtReader::VisitCXXNewExpr(CXXNewExpr *E) { @@ -1180,8 +1180,7 @@ ASTStmtReader::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E) { ++Idx; // NumArgs; for (unsigned I = 0, N = E->arg_size(); I != N; ++I) E->setArg(I, Reader.ReadSubExpr()); - E->setTypeBeginLoc(Reader.ReadSourceLocation(Record, Idx)); - E->setTypeAsWritten(Reader.GetType(Record[Idx++])); + E->Type = Reader.GetTypeSourceInfo(DeclsCursor, Record, Idx); E->setLParenLoc(Reader.ReadSourceLocation(Record, Idx)); E->setRParenLoc(Reader.ReadSourceLocation(Record, Idx)); } |