Douglas Gregor | 6e975c4 | 2011-09-13 23:15:45 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | 8f95cb3 | 2012-01-29 16:43:46 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s |
| 3 | // RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -x objective-c++ -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s |
| 4 | // RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s |
Douglas Gregor | 05edf66 | 2011-10-17 14:55:37 +0000 | [diff] [blame] | 5 | #define FOO |
Douglas Gregor | 5948ae1 | 2012-01-03 18:04:46 +0000 | [diff] [blame] | 6 | @import Module; |
Douglas Gregor | 0f50b08 | 2011-09-15 14:56:27 +0000 | [diff] [blame] | 7 | @interface OtherClass |
| 8 | @end |
Douglas Gregor | aa93a87 | 2011-10-17 15:32:29 +0000 | [diff] [blame] | 9 | |
| 10 | |
Douglas Gregor | 585ec93 | 2011-12-23 00:23:59 +0000 | [diff] [blame] | 11 | |
| 12 | |
Douglas Gregor | 0f50b08 | 2011-09-15 14:56:27 +0000 | [diff] [blame] | 13 | // in module: expected-note{{class method 'alloc' is assumed to return an instance of its receiver type ('Module *')}} |
Douglas Gregor | 21cae20 | 2011-09-12 23:31:24 +0000 | [diff] [blame] | 14 | void test_getModuleVersion() { |
Douglas Gregor | 6e975c4 | 2011-09-13 23:15:45 +0000 | [diff] [blame] | 15 | const char *version = getModuleVersion(); |
| 16 | const char *version2 = [Module version]; |
Douglas Gregor | 0f50b08 | 2011-09-15 14:56:27 +0000 | [diff] [blame] | 17 | |
| 18 | OtherClass *other = [Module alloc]; // expected-error{{init}} |
Douglas Gregor | 21cae20 | 2011-09-12 23:31:24 +0000 | [diff] [blame] | 19 | } |
| 20 | |
Douglas Gregor | ac252a3 | 2011-12-06 19:39:29 +0000 | [diff] [blame] | 21 | #ifdef MODULE_SUBFRAMEWORK_H |
| 22 | # error MODULE_SUBFRAMEWORK_H should be hidden |
Douglas Gregor | aa93a87 | 2011-10-17 15:32:29 +0000 | [diff] [blame] | 23 | #endif |
Douglas Gregor | 21cae20 | 2011-09-12 23:31:24 +0000 | [diff] [blame] | 24 | |
Douglas Gregor | 8f95cb3 | 2012-01-29 16:43:46 +0000 | [diff] [blame] | 25 | @import subdir; |
| 26 | |
| 27 | const char *getSubdirTest() { return getSubdir(); } |