]> granicus.if.org Git - clang/commitdiff
[test] Expand a bit on the test case from r231251. NFC.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 5 Mar 2015 03:12:33 +0000 (03:12 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 5 Mar 2015 03:12:33 +0000 (03:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231346 91177308-0d34-0410-b5e6-96231b3b80d8

test/Modules/Inputs/Module.framework/Headers/Module.h
test/Modules/crashes.m

index 55ce7a3e30fd45a2194859134033d4fd641fe368..7299823c81be9278c3a04bac25078d42382aabf0 100644 (file)
@@ -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
index cfdd1b2a5413306a930c203086ad74808bf58400..edefd379e8a521c2f4d44c5bc98c7a8024451ede 100644 (file)
@@ -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