2011-09-14 07:15:45 +08:00
|
|
|
// RUN: rm -rf %t
|
2013-02-08 03:01:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s
|
|
|
|
// RUN: %clang_cc1 -fmodules -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
|
|
|
|
// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodules-cache-path=%t -F %S/Inputs -I %S/Inputs -verify %s
|
2011-10-17 22:55:37 +08:00
|
|
|
#define FOO
|
2012-12-12 06:11:52 +08:00
|
|
|
@import Module;
|
2011-09-15 22:56:27 +08:00
|
|
|
@interface OtherClass
|
|
|
|
@end
|
2011-10-17 23:32:29 +08:00
|
|
|
|
2012-07-12 03:58:23 +08:00
|
|
|
// in module: expected-note@17{{class method 'alloc' is assumed to return an instance of its receiver type ('Module *')}}
|
2011-09-13 07:31:24 +08:00
|
|
|
void test_getModuleVersion() {
|
2011-09-14 07:15:45 +08:00
|
|
|
const char *version = getModuleVersion();
|
|
|
|
const char *version2 = [Module version];
|
2011-09-15 22:56:27 +08:00
|
|
|
|
|
|
|
OtherClass *other = [Module alloc]; // expected-error{{init}}
|
2011-09-13 07:31:24 +08:00
|
|
|
}
|
|
|
|
|
2011-12-07 03:39:29 +08:00
|
|
|
#ifdef MODULE_SUBFRAMEWORK_H
|
|
|
|
# error MODULE_SUBFRAMEWORK_H should be hidden
|
2011-10-17 23:32:29 +08:00
|
|
|
#endif
|
2011-09-13 07:31:24 +08:00
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import subdir;
|
2012-01-30 00:43:46 +08:00
|
|
|
|
|
|
|
const char *getSubdirTest() { return getSubdir(); }
|