summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2015-06-19 18:14:46 +0000
committerDouglas Gregor <dgregor@apple.com>2015-06-19 18:14:46 +0000
commit849ebc269fe17def169c812f929746cb98955664 (patch)
tree5866b34d318c220f0fb7b078164e0710e72f7ea8 /clang/lib/Sema/SemaDeclObjC.cpp
parent813a066f16df52783708fdc2ef708bb76a9ff521 (diff)
downloadbcm5719-llvm-849ebc269fe17def169c812f929746cb98955664.tar.gz
bcm5719-llvm-849ebc269fe17def169c812f929746cb98955664.zip
Implement the 'null_resettable' attribute for Objective-C properties.
'null_resettable' properties are those whose getters return nonnull but whose setters take nil, to "reset" the property to some default. Implements rdar://problem/19051334. llvm-svn: 240155
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 78c76abd4c7..62ba7d5633c 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -2024,6 +2024,9 @@ void Sema::ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl* IMPDecl,
DiagnoseUnimplementedProperties(S, IMPDecl, CDecl, SynthesizeProperties);
}
+ // Diagnose null-resettable synthesized setters.
+ diagnoseNullResettableSynthesizedSetters(IMPDecl);
+
SelectorSet ClsMap;
for (const auto *I : IMPDecl->class_methods())
ClsMap.insert(I->getSelector());
OpenPOWER on IntegriCloud