Use getDeclName() instead of getIdentifier() (safe against null pointers)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68804 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index edbb018..898ecbb 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1362,7 +1362,7 @@
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();
}
}
}