summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2015-03-05 03:12:33 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2015-03-05 03:12:33 +0000
commitd2d3597ea2647009a318394141e72960dfa5d913 (patch)
tree3d23f5bc51e248dc0c229811df22b8b440316e5a
parent3ba3e7131ed49306c059d5dc8e0918d45834f71a (diff)
downloadbcm5719-llvm-d2d3597ea2647009a318394141e72960dfa5d913.tar.gz
bcm5719-llvm-d2d3597ea2647009a318394141e72960dfa5d913.zip
[test] Expand a bit on the test case from r231251. NFC.
llvm-svn: 231346
-rw-r--r--clang/test/Modules/Inputs/Module.framework/Headers/Module.h4
-rw-r--r--clang/test/Modules/crashes.m4
2 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/Modules/Inputs/Module.framework/Headers/Module.h b/clang/test/Modules/Inputs/Module.framework/Headers/Module.h
index 55ce7a3e30f..7299823c81b 100644
--- a/clang/test/Modules/Inputs/Module.framework/Headers/Module.h
+++ b/clang/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/clang/test/Modules/crashes.m b/clang/test/Modules/crashes.m
index cfdd1b2a541..edefd379e8a 100644
--- a/clang/test/Modules/crashes.m
+++ b/clang/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
OpenPOWER on IntegriCloud