r231346 - [test] Expand a bit on the test case from r231251. NFC.
Argyrios Kyrtzidis
akyrtzi at gmail.com
Wed Mar 4 19:12:34 PST 2015
Author: akirtzidis
Date: Wed Mar 4 21:12:33 2015
New Revision: 231346
URL: http://llvm.org/viewvc/llvm-project?rev=231346&view=rev
Log:
[test] Expand a bit on the test case from r231251. NFC.
Modified:
cfe/trunk/test/Modules/Inputs/Module.framework/Headers/Module.h
cfe/trunk/test/Modules/crashes.m
Modified: cfe/trunk/test/Modules/Inputs/Module.framework/Headers/Module.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/Module.framework/Headers/Module.h?rev=231346&r1=231345&r2=231346&view=diff
==============================================================================
--- cfe/trunk/test/Modules/Inputs/Module.framework/Headers/Module.h (original)
+++ cfe/trunk/test/Modules/Inputs/Module.framework/Headers/Module.h Wed Mar 4 21:12:33 2015
@@ -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
Modified: cfe/trunk/test/Modules/crashes.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/crashes.m?rev=231346&r1=231345&r2=231346&view=diff
==============================================================================
--- cfe/trunk/test/Modules/crashes.m (original)
+++ cfe/trunk/test/Modules/crashes.m Wed Mar 4 21:12:33 2015
@@ -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
More information about the cfe-commits
mailing list