Douglas Gregor | 1519766 | 2013-04-03 23:06:26 +0000 | [diff] [blame] | 1 | @import builtin; |
| 2 | |
| 3 | int foo() { |
| 4 | return __builtin_object_size(p, 0); |
| 5 | } |
| 6 | |
| 7 | @import builtin.sub; |
| 8 | |
| 9 | int bar() { |
| 10 | return __builtin_object_size(p, 0); |
| 11 | } |
| 12 | |
Ben Langmuir | b9ad4e6 | 2015-10-28 22:25:37 +0000 | [diff] [blame] | 13 | int baz() { |
| 14 | return IS_CONST(0); |
| 15 | } |
Douglas Gregor | 1519766 | 2013-04-03 23:06:26 +0000 | [diff] [blame] | 16 | |
Quentin Colombet | 0cdb86b | 2016-02-03 22:14:53 +0000 | [diff] [blame] | 17 | // RUN: rm -rf %t |
| 18 | // RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs %s -verify |
| 19 | |
| 20 | // RUN: rm -rf %t.pch.cache |
| 21 | // 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 |
| 22 | // RUN: %clang_cc1 -fmodules-cache-path=%t.pch.cache -fmodules -fimplicit-module-maps -I %S/Inputs %s -include-pch %t.pch %s -verify |
| 23 | |
| 24 | // expected-no-diagnostics |