| 1 |
// UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}} |
| 2 |
// RUN: rm -rf %t |
| 3 |
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs %s -verify |
| 4 |
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs -x c %s -verify |
| 5 |
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs -x objective-c++ %s -verify |
| 6 |
|
| 7 |
// RUN: rm -rf %t.pch.cache |
| 8 |
// 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 |
| 9 |
// RUN: %clang_cc1 -fmodules-cache-path=%t.pch.cache -fmodules -fimplicit-module-maps -I %S/Inputs %s -include-pch %t.pch %s -verify |
| 10 |
|
| 11 |
// expected-no-diagnostics |
| 12 |
|
| 13 |
void use_constant_string_builtins1(void) { |
| 14 |
(void)__builtin___CFStringMakeConstantString(""); |
| 15 |
(void)__builtin___NSStringMakeConstantString(""); |
| 16 |
} |
| 17 |
|
| 18 |
#include "builtin.h" |
| 19 |
|
| 20 |
int foo(void) { |
| 21 |
return __builtin_object_size(p, 0); |
| 22 |
} |
| 23 |
|
| 24 |
#include "builtin_sub.h" |
| 25 |
|
| 26 |
int bar(void) { |
| 27 |
return __builtin_object_size(p, 0); |
| 28 |
} |
| 29 |
|
| 30 |
int baz(void) { |
| 31 |
return IS_CONST(0); |
| 32 |
} |
| 33 |
|
| 34 |
void use_constant_string_builtins2(void) { |
| 35 |
(void)__builtin___CFStringMakeConstantString(""); |
| 36 |
(void)__builtin___NSStringMakeConstantString(""); |
| 37 |
} |