[Lex] Add support for 'user specified system frameworks' (see test case).
 - Developers of system frameworks need a way for their framework to be treated as a "system framework" during development. Otherwise, they are unable to properly test how their framework behaves when installed because of the semantic changes (in warning behavior) applied to system frameworks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154105 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Preprocessor/Inputs/TestFramework.framework/.system_framework b/test/Preprocessor/Inputs/TestFramework.framework/.system_framework
new file mode 100644
index 0000000..e69de29
--- /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 0000000..489f17a
--- /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 0000000..06f9ab5
--- /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 0000000..8e3db56
--- /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);
+}