aboutsummaryrefslogtreecommitdiff
path: root/test/PCH/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH/Inputs')
-rw-r--r--test/PCH/Inputs/chain-cxx1.h19
-rw-r--r--test/PCH/Inputs/chain-cxx2.h32
-rw-r--r--test/PCH/Inputs/chain-macro-override1.h1
-rw-r--r--test/PCH/Inputs/chain-macro-override2.h1
-rw-r--r--test/PCH/Inputs/chain-remap-types1.h10
-rw-r--r--test/PCH/Inputs/chain-remap-types2.h8
-rw-r--r--test/PCH/Inputs/chain-selectors1.h4
-rw-r--r--test/PCH/Inputs/chain-selectors2.h4
-rw-r--r--test/PCH/Inputs/namespaces.h4
-rw-r--r--test/PCH/Inputs/typo.h6
-rw-r--r--test/PCH/Inputs/va_arg.h2
11 files changed, 40 insertions, 51 deletions
diff --git a/test/PCH/Inputs/chain-cxx1.h b/test/PCH/Inputs/chain-cxx1.h
deleted file mode 100644
index 7ea3ffb61c8f..000000000000
--- a/test/PCH/Inputs/chain-cxx1.h
+++ /dev/null
@@ -1,19 +0,0 @@
-// Primary header for C++ chained PCH test
-
-void f();
-
-// Name not appearing in dependent
-void pf();
-
-namespace ns {
- void g();
-
- void pg();
-}
-
-template <typename T>
-struct S { typedef int G; };
-
-// Partially specialize
-template <typename T>
-struct S<T *> { typedef int H; };
diff --git a/test/PCH/Inputs/chain-cxx2.h b/test/PCH/Inputs/chain-cxx2.h
deleted file mode 100644
index adc10fd83681..000000000000
--- a/test/PCH/Inputs/chain-cxx2.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Dependent header for C++ chained PCH test
-
-// Overload function from primary
-void f(int);
-
-// Add function with different name
-void f2();
-
-// Reopen namespace
-namespace ns {
- // Overload function from primary
- void g(int);
-
- // Add different name
- void g2();
-}
-
-// Specialize template from primary
-template <>
-struct S<int> { typedef int I; };
-
-// Partially specialize
-template <typename T>
-struct S<T &> { typedef int J; };
-
-// Specialize previous partial specialization
-template <>
-struct S<int *> { typedef int K; };
-
-// Specialize the partial specialization from this file
-template <>
-struct S<int &> { typedef int L; };
diff --git a/test/PCH/Inputs/chain-macro-override1.h b/test/PCH/Inputs/chain-macro-override1.h
index 4f9321de93b1..d956396f9160 100644
--- a/test/PCH/Inputs/chain-macro-override1.h
+++ b/test/PCH/Inputs/chain-macro-override1.h
@@ -2,3 +2,4 @@ void f() __attribute__((unavailable));
void g();
#define g() f()
#define h() f()
+#define x x
diff --git a/test/PCH/Inputs/chain-macro-override2.h b/test/PCH/Inputs/chain-macro-override2.h
index f279e2ad48c0..e4bff77294fd 100644
--- a/test/PCH/Inputs/chain-macro-override2.h
+++ b/test/PCH/Inputs/chain-macro-override2.h
@@ -2,3 +2,4 @@
#undef g
#undef h
#define h() g()
+int x;
diff --git a/test/PCH/Inputs/chain-remap-types1.h b/test/PCH/Inputs/chain-remap-types1.h
new file mode 100644
index 000000000000..d105489abd73
--- /dev/null
+++ b/test/PCH/Inputs/chain-remap-types1.h
@@ -0,0 +1,10 @@
+@class X;
+
+struct Y {
+ X *my_X;
+};
+
+@interface X {
+}
+@property X *prop;
+@end
diff --git a/test/PCH/Inputs/chain-remap-types2.h b/test/PCH/Inputs/chain-remap-types2.h
new file mode 100644
index 000000000000..55ca8a9e3190
--- /dev/null
+++ b/test/PCH/Inputs/chain-remap-types2.h
@@ -0,0 +1,8 @@
+void h(X*);
+
+@interface X (Blah) {
+}
+@end
+
+void g(X*);
+
diff --git a/test/PCH/Inputs/chain-selectors1.h b/test/PCH/Inputs/chain-selectors1.h
index 37c1c00b5741..b0b68f8332c1 100644
--- a/test/PCH/Inputs/chain-selectors1.h
+++ b/test/PCH/Inputs/chain-selectors1.h
@@ -10,3 +10,7 @@ void foo1() {
//(void)@selector(x);
(void)@selector(f);
}
+
+@interface X (Blah)
+- (void)blah_method;
+@end
diff --git a/test/PCH/Inputs/chain-selectors2.h b/test/PCH/Inputs/chain-selectors2.h
index 4d6b55663008..973fc107e90e 100644
--- a/test/PCH/Inputs/chain-selectors2.h
+++ b/test/PCH/Inputs/chain-selectors2.h
@@ -9,3 +9,7 @@ void foo2() {
//(void)@selector(y);
//(void)@selector(e);
}
+
+@interface X (Blarg)
+- (void)blarg_method;
+@end
diff --git a/test/PCH/Inputs/namespaces.h b/test/PCH/Inputs/namespaces.h
index 553aadd1f9ed..bd2c3ee98271 100644
--- a/test/PCH/Inputs/namespaces.h
+++ b/test/PCH/Inputs/namespaces.h
@@ -38,3 +38,7 @@ using namespace N2::Inner;
extern "C" {
void ext();
}
+
+inline namespace N4 {
+ struct MemberOfN4;
+}
diff --git a/test/PCH/Inputs/typo.h b/test/PCH/Inputs/typo.h
new file mode 100644
index 000000000000..63b553b91695
--- /dev/null
+++ b/test/PCH/Inputs/typo.h
@@ -0,0 +1,6 @@
+
+
+@interface NSString
++ (id)alloc;
+@end
+
diff --git a/test/PCH/Inputs/va_arg.h b/test/PCH/Inputs/va_arg.h
new file mode 100644
index 000000000000..1244e9faa36a
--- /dev/null
+++ b/test/PCH/Inputs/va_arg.h
@@ -0,0 +1,2 @@
+#include <stdarg.h>
+