aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/builtins.m
blob: 33d23979ce79e3203816ed2682d32d95be0913dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@import builtin;

int foo() {
  return __builtin_object_size(p, 0);
}

@import builtin.sub;

int bar() {
  return __builtin_object_size(p, 0);
}

int baz() {
  return IS_CONST(0);
}

// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs %s -verify

// RUN: rm -rf %t.pch.cache
// RUN: %clang_cc1 -fmodules-cache-path=%t.pch.cache -fmodules -fimplicit-module-maps -I %S/Inputs -emit-pch -o %t.pch -x objective-c-header %S/Inputs/use-builtin.h
// RUN: %clang_cc1 -fmodules-cache-path=%t.pch.cache -fmodules -fimplicit-module-maps -I %S/Inputs %s -include-pch %t.pch %s -verify

// expected-no-diagnostics