Extend type nullability qualifiers for Objective-C.
Introduce context-sensitive, non-underscored nullability specifiers (nonnull, nullable, null_unspecified) for Objective-C method return types, method parameter types, and properties. Introduce Objective-C-specific semantics, including computation of the nullability of the result of a message send, merging of nullability information from the @interface of a class into its @implementation, etc . This is the Objective-C part of rdar://problem/18868820. llvm-svn: 240154
This commit is contained in:
@@ -542,7 +542,7 @@ void ASTDeclWriter::VisitObjCMethodDecl(ObjCMethodDecl *D) {
|
||||
|
||||
// FIXME: stable encoding for @required/@optional
|
||||
Record.push_back(D->getImplementationControl());
|
||||
// FIXME: stable encoding for in/out/inout/bycopy/byref/oneway
|
||||
// FIXME: stable encoding for in/out/inout/bycopy/byref/oneway/nullability
|
||||
Record.push_back(D->getObjCDeclQualifier());
|
||||
Record.push_back(D->hasRelatedResultType());
|
||||
Writer.AddTypeRef(D->getReturnType(), Record);
|
||||
@@ -678,6 +678,7 @@ void ASTDeclWriter::VisitObjCPropertyDecl(ObjCPropertyDecl *D) {
|
||||
VisitNamedDecl(D);
|
||||
Writer.AddSourceLocation(D->getAtLoc(), Record);
|
||||
Writer.AddSourceLocation(D->getLParenLoc(), Record);
|
||||
Writer.AddTypeRef(D->getType(), Record);
|
||||
Writer.AddTypeSourceInfo(D->getTypeSourceInfo(), Record);
|
||||
// FIXME: stable encoding
|
||||
Record.push_back((unsigned)D->getPropertyAttributes());
|
||||
|
||||
Reference in New Issue
Block a user