Use getDeclName() instead of getIdentifier() (safe against null pointers)

llvm-svn: 68804
This commit is contained in:
Ted Kremenek 2009-04-10 18:25:37 +00:00
parent 2916a482fb
commit a53274e5ba
1 changed files with 1 additions and 1 deletions

View File

@ -1362,7 +1362,7 @@ void Sema::ActOnAtEnd(SourceLocation AtEndLoc, DeclPtrTy classDecl,
if (VDecl->getStorageClass() != VarDecl::Extern &&
VDecl->getStorageClass() != VarDecl::PrivateExtern)
Diag(VDecl->getLocation(), diag::err_objc_var_decl_inclass)
<< cast<NamedDecl>(ClassDecl)->getIdentifier();
<< cast<NamedDecl>(ClassDecl)->getDeclName();
}
}
}