aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend')
-rw-r--r--lib/Frontend/PCHReaderStmt.cpp2
-rw-r--r--lib/Frontend/PCHWriterStmt.cpp2
-rw-r--r--lib/Frontend/RewriteObjC.cpp4
3 files changed, 7 insertions, 1 deletions
diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp
index fdefec78ad..dfcc794a5d 100644
--- a/lib/Frontend/PCHReaderStmt.cpp
+++ b/lib/Frontend/PCHReaderStmt.cpp
@@ -491,6 +491,8 @@ unsigned PCHStmtReader::VisitConditionalOperator(ConditionalOperator *E) {
E->setCond(cast<Expr>(StmtStack[StmtStack.size() - 3]));
E->setLHS(cast_or_null<Expr>(StmtStack[StmtStack.size() - 2]));
E->setRHS(cast_or_null<Expr>(StmtStack[StmtStack.size() - 1]));
+ E->setQuestionLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
+ E->setColonLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
return 3;
}
diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp
index ffde5280ab..c0ebc7ed59 100644
--- a/lib/Frontend/PCHWriterStmt.cpp
+++ b/lib/Frontend/PCHWriterStmt.cpp
@@ -453,6 +453,8 @@ void PCHStmtWriter::VisitConditionalOperator(ConditionalOperator *E) {
Writer.WriteSubStmt(E->getCond());
Writer.WriteSubStmt(E->getLHS());
Writer.WriteSubStmt(E->getRHS());
+ Writer.AddSourceLocation(E->getQuestionLoc(), Record);
+ Writer.AddSourceLocation(E->getColonLoc(), Record);
Code = pch::EXPR_CONDITIONAL_OPERATOR;
}
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp
index 4d7bb314ed..8d5f4992ae 100644
--- a/lib/Frontend/RewriteObjC.cpp
+++ b/lib/Frontend/RewriteObjC.cpp
@@ -2591,7 +2591,9 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp) {
SourceLocation());
// (sizeof(returnType) <= 8 ? objc_msgSend(...) : objc_msgSend_stret(...))
ConditionalOperator *CondExpr =
- new (Context) ConditionalOperator(lessThanExpr, CE, STCE, returnType);
+ new (Context) ConditionalOperator(lessThanExpr,
+ SourceLocation(), CE,
+ SourceLocation(), STCE, returnType);
ReplacingStmt = new (Context) ParenExpr(SourceLocation(), SourceLocation(), CondExpr);
}
// delete Exp; leak for now, see RewritePropertySetter() usage for more info.