| 1 |
// RUN: rm -rf %t |
| 2 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s |
| 3 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -x objective-c++ -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s |
| 4 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s |
| 5 |
#define FOO |
| 6 |
@import Module; |
| 7 |
@interface OtherClass |
| 8 |
@end |
| 9 |
|
| 10 |
// expected-note@Inputs/Module.framework/Headers/Module.h:17{{class method 'alloc' is assumed to return an instance of its receiver type ('Module *')}} |
| 11 |
void test_getModuleVersion(void) { |
| 12 |
const char *version = getModuleVersion(); |
| 13 |
const char *version2 = [Module version]; |
| 14 |
|
| 15 |
OtherClass *other = [Module alloc]; // expected-error{{init}} |
| 16 |
} |
| 17 |
|
| 18 |
#ifdef MODULE_SUBFRAMEWORK_H |
| 19 |
# error MODULE_SUBFRAMEWORK_H should be hidden |
| 20 |
#endif |
| 21 |
|
| 22 |
@import subdir; |
| 23 |
|
| 24 |
const char *getSubdirTest(void) { return getSubdir(); } |