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