1*67e74705SXin Li// RUN: rm -rf %t.mcp 2*67e74705SXin Li// RUN: %clang_cc1 -fmodules-cache-path=%t.mcp -fmodules -fimplicit-module-maps -F %S/Inputs -fobjc-arc %s -verify 3*67e74705SXin Li 4*67e74705SXin Li@import Module; 5*67e74705SXin Li 6*67e74705SXin Li__attribute__((objc_root_class)) 7*67e74705SXin Li@interface Test 8*67e74705SXin Li// rdar://19904648 9*67e74705SXin Li// The diagnostic will try to find a suitable macro name to use (instead of raw __attribute__). 10*67e74705SXin Li// While iterating through the macros it would dereference a null pointer if the macro was undefined in the same module as it was originally defined in. 11*67e74705SXin Li@property (assign) id newFile; // expected-error {{property follows Cocoa naming convention for returning 'owned' objects}} \ 12*67e74705SXin Li // expected-note {{explicitly declare getter '-newFile' with '__attribute__((objc_method_family(none)))' to return an 'unowned' object}} 13*67e74705SXin Li@end 14*67e74705SXin Li 15*67e74705SXin Li@implementation Test 16*67e74705SXin Li@end 17