aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/on-demand-build.m
blob: 649caa8a7d8050bd7464e0d47e26635465031d69 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: rm -rf %t
// RUN: %clang_cc1 -fno-objc-infer-related-result-type -Werror -fmodule-cache-path %t -F %S/Inputs -verify %s
// RUN: %clang_cc1 -fno-objc-infer-related-result-type -Werror -x objective-c++ -fmodule-cache-path %t -F %S/Inputs -verify %s
// RUN: %clang_cc1 -fno-objc-infer-related-result-type -Werror -fmodule-cache-path %t -F %S/Inputs -verify %s
#define FOO
__import_module__ Module;
@interface OtherClass
@end
// in module: expected-note{{class method 'alloc' is assumed to return an instance of its receiver type ('Module *')}}
void test_getModuleVersion() {
  const char *version = getModuleVersion();
  const char *version2 = [Module version];

  OtherClass *other = [Module alloc]; // expected-error{{init}}
}