зеркало из https://github.com/microsoft/clang-1.git
Fix possible null dereference by bailing out of CheckObjCPropertyAttributes() early if the Decl* is null.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100483 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
caff6ea818
Коммит
5fcd52a6c9
|
@ -984,7 +984,10 @@ void Sema::CheckObjCPropertyAttributes(DeclPtrTy PropertyPtrTy,
|
|||
unsigned &Attributes) {
|
||||
// FIXME: Improve the reported location.
|
||||
Decl *PDecl = PropertyPtrTy.getAs<Decl>();
|
||||
ObjCPropertyDecl *PropertyDecl = dyn_cast_or_null<ObjCPropertyDecl>(PDecl);
|
||||
if (!PDecl)
|
||||
return;
|
||||
|
||||
ObjCPropertyDecl *PropertyDecl = cast<ObjCPropertyDecl>(PDecl);
|
||||
QualType PropertyTy = PropertyDecl->getType();
|
||||
|
||||
// readonly and readwrite/assign/retain/copy conflict.
|
||||
|
|
Загрузка…
Ссылка в новой задаче