From: Argyrios Kyrtzidis Date: Thu, 5 Mar 2015 03:12:33 +0000 (+0000) Subject: [test] Expand a bit on the test case from r231251. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c2cd0245ee53fe8bedb346ef4a3e5b1aac942b29;p=clang [test] Expand a bit on the test case from r231251. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231346 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Modules/Inputs/Module.framework/Headers/Module.h b/test/Modules/Inputs/Module.framework/Headers/Module.h index 55ce7a3e30..7299823c81 100644 --- a/test/Modules/Inputs/Module.framework/Headers/Module.h +++ b/test/Modules/Inputs/Module.framework/Headers/Module.h @@ -31,7 +31,7 @@ typedef struct __sFILE { extern FILE *myFile; -#define SOME_MACRO_GETTING_UNDEFINED 1 -#undef SOME_MACRO_GETTING_UNDEFINED +#define SOME_MACRO_ATTR_GETTING_UNDEFINED __attribute__((objc_method_family(none))) +#undef SOME_MACRO_ATTR_GETTING_UNDEFINED #endif // MODULE_H diff --git a/test/Modules/crashes.m b/test/Modules/crashes.m index cfdd1b2a54..edefd379e8 100644 --- a/test/Modules/crashes.m +++ b/test/Modules/crashes.m @@ -6,8 +6,10 @@ __attribute__((objc_root_class)) @interface Test // rdar://19904648 +// The diagnostic will try to find a suitable macro name to use (instead of raw __attribute__). +// 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. @property (assign) id newFile; // expected-error {{property follows Cocoa naming convention for returning 'owned' objects}} \ - // expected-note {{explicitly declare getter}} + // expected-note {{explicitly declare getter '-newFile' with '__attribute__((objc_method_family(none)))' to return an 'unowned' object}} @end @implementation Test