Remove setters from CXXTypeidExpr and CXXUuidofExpr.
We generally prefer to have the ASTReader directly set fields rather
than including public setter functions.
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index f2338a1..e90bafc 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -1748,14 +1748,10 @@
void ASTStmtReader::VisitCXXTypeidExpr(CXXTypeidExpr *E) {
VisitExpr(E);
E->setSourceRange(readSourceRange());
- if (E->isTypeOperand()) { // typeid(int)
- E->setTypeOperandSourceInfo(
- readTypeSourceInfo());
- return;
- }
-
- // typeid(42+2)
- E->setExprOperand(Record.readSubExpr());
+ if (E->isTypeOperand())
+ E->Operand = readTypeSourceInfo();
+ else
+ E->Operand = Record.readSubExpr();
}
void ASTStmtReader::VisitCXXThisExpr(CXXThisExpr *E) {
@@ -2162,14 +2158,10 @@
E->setSourceRange(readSourceRange());
std::string UuidStr = readString();
E->setUuidStr(StringRef(UuidStr).copy(Record.getContext()));
- if (E->isTypeOperand()) { // __uuidof(ComType)
- E->setTypeOperandSourceInfo(
- readTypeSourceInfo());
- return;
- }
-
- // __uuidof(expr)
- E->setExprOperand(Record.readSubExpr());
+ if (E->isTypeOperand())
+ E->Operand = readTypeSourceInfo();
+ else
+ E->Operand = Record.readSubExpr();
}
void ASTStmtReader::VisitSEHLeaveStmt(SEHLeaveStmt *S) {