typedef Decl** iterator;
typedef Decl* const * const_iterator;
+ bool isNull() const { return D == 0; }
bool isSingleDecl() const { return getKind() == SingleDeclKind; }
bool isDeclGroup() const { return getKind() == DeclGroupKind; }
Sema::OwningStmtResult Sema::ActOnDeclStmt(DeclGroupPtrTy dg,
SourceLocation StartLoc,
SourceLocation EndLoc) {
+ DeclGroupRef DG = dg.getAsVal<DeclGroupRef>();
+
// If we have an invalid decl, just return an error.
- if (!dg) return StmtError();
+ if (DG.isNull()) return StmtError();
- DeclGroupRef DG = dg.getAsVal<DeclGroupRef>();
return Owned(new (Context) DeclStmt(DG, StartLoc, EndLoc));
}