summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/StmtSerialization.cpp8
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/AST/StmtSerialization.cpp b/clang/lib/AST/StmtSerialization.cpp
index 8aa7e289e4d..5f87b68dba5 100644
--- a/clang/lib/AST/StmtSerialization.cpp
+++ b/clang/lib/AST/StmtSerialization.cpp
@@ -379,16 +379,18 @@ CaseStmt* CaseStmt::CreateImpl(Deserializer& D, ASTContext& C) {
void CStyleCastExpr::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.Emit(getTypeAsWritten());
- S.Emit(Loc);
+ S.Emit(LPLoc);
+ S.Emit(RPLoc);
S.EmitOwnedPtr(getSubExpr());
}
CStyleCastExpr* CStyleCastExpr::CreateImpl(Deserializer& D, ASTContext& C) {
QualType t = QualType::ReadVal(D);
QualType writtenTy = QualType::ReadVal(D);
- SourceLocation Loc = SourceLocation::ReadVal(D);
+ SourceLocation LPLoc = SourceLocation::ReadVal(D);
+ SourceLocation RPLoc = SourceLocation::ReadVal(D);
Expr* Op = D.ReadOwnedPtr<Expr>(C);
- return new CStyleCastExpr(t,Op,writtenTy,Loc);
+ return new CStyleCastExpr(t,Op,writtenTy,LPLoc,RPLoc);
}
void CharacterLiteral::EmitImpl(Serializer& S) const {
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index b23db487677..f06a04101b8 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -1324,7 +1324,7 @@ ActOnCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
if (CheckCastTypes(SourceRange(LParenLoc, RParenLoc), castType, castExpr))
return true;
- return new CStyleCastExpr(castType, castExpr, castType, LParenLoc);
+ return new CStyleCastExpr(castType, castExpr, castType, LParenLoc, RParenLoc);
}
/// Note that lex is not null here, even if this is the gnu "x ?: y" extension.
OpenPOWER on IntegriCloud