warning is coming out incorrectly too early
becuase of unrelated scope pop. // rdar://
15630719
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196989
91177308-0d34-0410-b5e6-
96231b3b80d8
return false;
}
+ /// isInObjcMethodOuterScope - Return true if this scope is an
+ /// Objective-C method outer most body.
+ bool isInObjcMethodOuterScope() const {
+ if (const Scope *S = this) {
+ // If this scope is an objc method scope, then we succeed.
+ if (S->getFlags() & ObjCMethodScope)
+ return true;
+ }
+ return false;
+ }
+
+
/// isTemplateParamScope - Return true if this scope is a C++
/// template parameter scope.
bool isTemplateParamScope() const {
}
void Sema::DiagnoseUnusedBackingIvarInAccessor(Scope *S) {
- if (S->hasUnrecoverableErrorOccurred() || !S->isInObjcMethodScope())
+ if (S->hasUnrecoverableErrorOccurred() || !S->isInObjcMethodOuterScope())
return;
const ObjCMethodDecl *CurMethod = getCurMethodDecl();
return 0;
}
@end
+
+// rdar://15630719
+@interface CDBModifyRecordsOperation : NSObject
+@property (nonatomic, assign) BOOL atomic;
+@end
+
+@class NSString;
+
+@implementation CDBModifyRecordsOperation
+- (void)setAtomic:(BOOL)atomic {
+ if (atomic == __objc_yes) {
+ NSString *recordZoneID = 0;
+ }
+ _atomic = atomic;
+}
+@end
+