aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index dd548fa..e830c40 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -7835,7 +7835,7 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) {
case OpenACCClauseKind::If: {
const auto *IC = cast<OpenACCIfClause>(C);
writeSourceLocation(IC->getLParenLoc());
- writeStmtRef(IC->getConditionExpr());
+ AddStmt(const_cast<Expr*>(IC->getConditionExpr()));
return;
}
case OpenACCClauseKind::Self: {
@@ -7843,7 +7843,7 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) {
writeSourceLocation(SC->getLParenLoc());
writeBool(SC->hasConditionExpr());
if (SC->hasConditionExpr())
- writeStmtRef(SC->getConditionExpr());
+ AddStmt(const_cast<Expr*>(SC->getConditionExpr()));
return;
}
case OpenACCClauseKind::NumGangs: {
@@ -7857,13 +7857,13 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) {
case OpenACCClauseKind::NumWorkers: {
const auto *NWC = cast<OpenACCNumWorkersClause>(C);
writeSourceLocation(NWC->getLParenLoc());
- writeStmtRef(NWC->getIntExpr());
+ AddStmt(const_cast<Expr*>(NWC->getIntExpr()));
return;
}
case OpenACCClauseKind::VectorLength: {
const auto *NWC = cast<OpenACCVectorLengthClause>(C);
writeSourceLocation(NWC->getLParenLoc());
- writeStmtRef(NWC->getIntExpr());
+ AddStmt(const_cast<Expr*>(NWC->getIntExpr()));
return;
}
case OpenACCClauseKind::Private: {
@@ -7942,15 +7942,15 @@ void ASTRecordWriter::writeOpenACCClause(const OpenACCClause *C) {
writeSourceLocation(AC->getLParenLoc());
writeBool(AC->hasIntExpr());
if (AC->hasIntExpr())
- writeStmtRef(AC->getIntExpr());
+ AddStmt(const_cast<Expr*>(AC->getIntExpr()));
return;
}
case OpenACCClauseKind::Wait: {
const auto *WC = cast<OpenACCWaitClause>(C);
writeSourceLocation(WC->getLParenLoc());
writeBool(WC->getDevNumExpr());
- if (const Expr *DNE = WC->getDevNumExpr())
- writeStmtRef(DNE);
+ if (Expr *DNE = WC->getDevNumExpr())
+ AddStmt(DNE);
writeSourceLocation(WC->getQueuesLoc());
writeOpenACCIntExprList(WC->getQueueIdExprs());