aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor')
-rw-r--r--test/Preprocessor/Inputs/TestFramework.framework/.system_framework0
-rw-r--r--test/Preprocessor/Inputs/TestFramework.framework/Frameworks/AnotherTestFramework.framework/Headers/AnotherTestFramework.h3
-rw-r--r--test/Preprocessor/Inputs/TestFramework.framework/Headers/TestFramework.h6
-rw-r--r--test/Preprocessor/user_defined_system_framework.c8
4 files changed, 17 insertions, 0 deletions
diff --git a/test/Preprocessor/Inputs/TestFramework.framework/.system_framework b/test/Preprocessor/Inputs/TestFramework.framework/.system_framework
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/Preprocessor/Inputs/TestFramework.framework/.system_framework
diff --git a/test/Preprocessor/Inputs/TestFramework.framework/Frameworks/AnotherTestFramework.framework/Headers/AnotherTestFramework.h b/test/Preprocessor/Inputs/TestFramework.framework/Frameworks/AnotherTestFramework.framework/Headers/AnotherTestFramework.h
new file mode 100644
index 0000000000..489f17a729
--- /dev/null
+++ b/test/Preprocessor/Inputs/TestFramework.framework/Frameworks/AnotherTestFramework.framework/Headers/AnotherTestFramework.h
@@ -0,0 +1,3 @@
+static inline int another_test_framework_func(unsigned a) {
+ return a;
+}
diff --git a/test/Preprocessor/Inputs/TestFramework.framework/Headers/TestFramework.h b/test/Preprocessor/Inputs/TestFramework.framework/Headers/TestFramework.h
new file mode 100644
index 0000000000..06f9ab545d
--- /dev/null
+++ b/test/Preprocessor/Inputs/TestFramework.framework/Headers/TestFramework.h
@@ -0,0 +1,6 @@
+// Include a subframework header.
+#include <AnotherTestFramework/AnotherTestFramework.h>
+
+static inline int test_framework_func(unsigned a) {
+ return a;
+}
diff --git a/test/Preprocessor/user_defined_system_framework.c b/test/Preprocessor/user_defined_system_framework.c
new file mode 100644
index 0000000000..8e3db56197
--- /dev/null
+++ b/test/Preprocessor/user_defined_system_framework.c
@@ -0,0 +1,8 @@
+// RUN: %clang -cc1 -fsyntax-only -F %S/Inputs -Wsign-conversion -verify %s
+
+// Check that TestFramework is treated as a system header.
+#include <TestFramework/TestFramework.h>
+
+int f1() {
+ return test_framework_func(1) + another_test_framework_func(2);
+}