aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/NoReturn.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/NoReturn.m')
-rw-r--r--test/Analysis/NoReturn.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Analysis/NoReturn.m b/test/Analysis/NoReturn.m
index 9b7011e793186..5ed92dfe5d4e3 100644
--- a/test/Analysis/NoReturn.m
+++ b/test/Analysis/NoReturn.m
@@ -131,3 +131,15 @@ void test_wassert() {
int *p = 0;
*p = 0xDEADBEEF; // no-warning
}
+#undef assert
+
+// Test that hard-coded Android __assert2 name is recognized as a noreturn
+#define assert(_Expression) ((_Expression) ? (void)0 : __assert2(0, 0, 0, 0));
+extern void __assert2(const char *, int, const char *, const char *);
+extern void _wassert(const char * _Message, const char *_File, unsigned _Line);
+void test___assert2() {
+ assert(0);
+ int *p = 0;
+ *p = 0xDEADBEEF; // no-warning
+}
+#undef assert