summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-10-28 02:30:45 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-10-28 02:30:45 +0000
commit0ac158a528d3f490af6e4ed5a7d8ff7f878f9baf (patch)
tree01108c93127c66db79880f0d36917a8c340b05ff /clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks
parent58fbc916a0a4ad57ec6d3dd1d1a4f0dd7405f69f (diff)
downloadbcm5719-llvm-0ac158a528d3f490af6e4ed5a7d8ff7f878f9baf.tar.gz
bcm5719-llvm-0ac158a528d3f490af6e4ed5a7d8ff7f878f9baf.zip
[Modules] Add testcase for builtins used in umbrella headers
This used to work before r284797 + r285152, which exposed something interesting; some users include builtins from umbrella headers. Clang should emit a warning to warn users this is not a good practice and umbrella headers shouldn't get the implicitly-add-the-builtin-version behavior for builtin header names. While we're not there, add the testcase to represent the way it currently works. llvm-svn: 285377
Diffstat (limited to 'clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks')
-rw-r--r--clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/A.h15
-rw-r--r--clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/int.h14
-rw-r--r--clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Modules/module.modulemap4
3 files changed, 33 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/A.h b/clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/A.h
new file mode 100644
index 00000000000..2ee00c1129a
--- /dev/null
+++ b/clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/A.h
@@ -0,0 +1,15 @@
+#ifndef __my_a
+#define __my_a
+
+#include <A/int.h>
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef int_fast32_t my_a;
+}
+
+#endif
diff --git a/clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/int.h b/clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/int.h
new file mode 100644
index 00000000000..340315ed9f5
--- /dev/null
+++ b/clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Headers/int.h
@@ -0,0 +1,14 @@
+#ifndef __my_int
+#define __my_int
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef int_fast32_t myint;
+}
+
+#endif
diff --git a/clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Modules/module.modulemap b/clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Modules/module.modulemap
new file mode 100644
index 00000000000..1e91233a90c
--- /dev/null
+++ b/clang/test/Modules/Inputs/libc-libcxx/sysroot/Frameworks/A.framework/Modules/module.modulemap
@@ -0,0 +1,4 @@
+framework module A [extern_c] {
+ umbrella header "A.h"
+ export *
+}
OpenPOWER on IntegriCloud