forked from OSchip/llvm-project
[PCH] When serializing an PseudoObjectExpr or AtomicExpr, the serialization code must be set
otherwise it will crash with asserts on or it will be written as null pointer. llvm-svn: 144626
This commit is contained in:
parent
233f12d9e2
commit
5938650b13
|
@ -753,6 +753,8 @@ void ASTStmtWriter::VisitPseudoObjectExpr(PseudoObjectExpr *E) {
|
|||
if (OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(*i))
|
||||
Writer.AddStmt(OVE->getSourceExpr());
|
||||
}
|
||||
|
||||
Code = serialization::EXPR_PSEUDO_OBJECT;
|
||||
}
|
||||
|
||||
void ASTStmtWriter::VisitAtomicExpr(AtomicExpr *E) {
|
||||
|
@ -768,6 +770,8 @@ void ASTStmtWriter::VisitAtomicExpr(AtomicExpr *E) {
|
|||
}
|
||||
Writer.AddSourceLocation(E->getBuiltinLoc(), Record);
|
||||
Writer.AddSourceLocation(E->getRParenLoc(), Record);
|
||||
|
||||
Code = serialization::EXPR_ATOMIC;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -16,3 +16,11 @@ typedef typeof(id<foo>) objc_id_protocol_ty;
|
|||
|
||||
typedef typeof(itf*) objc_interface_ty;
|
||||
typedef typeof(itf<foo>*) objc_qual_interface_ty;
|
||||
|
||||
@interface PP
|
||||
@property (assign) id prop;
|
||||
@end
|
||||
|
||||
static inline id getPseudoObject(PP *p) {
|
||||
return p.prop;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue