summaryrefslogtreecommitdiffstats
path: root/test/ASTMerge/Inputs
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
committerdim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
commit39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch)
treea9243275843fbeaa590afc07ee888e006b8d54ea /test/ASTMerge/Inputs
parent69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff)
downloadFreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip
FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/ASTMerge/Inputs')
-rw-r--r--test/ASTMerge/Inputs/category1.m23
-rw-r--r--test/ASTMerge/Inputs/category2.m22
-rw-r--r--test/ASTMerge/Inputs/class-template1.cpp34
-rw-r--r--test/ASTMerge/Inputs/class-template2.cpp35
-rw-r--r--test/ASTMerge/Inputs/class1.cpp7
-rw-r--r--test/ASTMerge/Inputs/class2.cpp1
-rw-r--r--test/ASTMerge/Inputs/interface1.m22
-rw-r--r--test/ASTMerge/Inputs/interface2.m20
-rw-r--r--test/ASTMerge/Inputs/property1.m19
-rw-r--r--test/ASTMerge/Inputs/property2.m20
10 files changed, 203 insertions, 0 deletions
diff --git a/test/ASTMerge/Inputs/category1.m b/test/ASTMerge/Inputs/category1.m
index ade1c6c..afcaab8 100644
--- a/test/ASTMerge/Inputs/category1.m
+++ b/test/ASTMerge/Inputs/category1.m
@@ -23,3 +23,26 @@
@interface I2 ()
- (int)method3;
@end
+
+// Category with implementation
+@interface I2 (Cat3)
+@end
+
+@implementation I2 (Cat3)
+@end
+
+// Category with implementation
+@interface I2 (Cat4)
+@end
+
+@implementation I2 (Cat4)
+@end
+
+// Category with mismatched implementation
+@interface I2 (Cat6)
+@end
+
+@implementation I2 (Cat6)
+- (float)blah { return 0; }
+@end
+
diff --git a/test/ASTMerge/Inputs/category2.m b/test/ASTMerge/Inputs/category2.m
index f66c208..49a3c27 100644
--- a/test/ASTMerge/Inputs/category2.m
+++ b/test/ASTMerge/Inputs/category2.m
@@ -25,3 +25,25 @@ typedef int Int;
@interface I2 ()
- (float)method3;
@end
+
+// Category with implementation
+@interface I2 (Cat3)
+@end
+
+@implementation I2 (Cat3)
+@end
+
+// Category with implementation
+@interface I2 (Cat5)
+@end
+
+@implementation I2 (Cat5)
+@end
+
+// Category with mismatched implementation
+@interface I2 (Cat6)
+@end
+
+@implementation I2 (Cat6)
+- (int)blah { return 0; }
+@end
diff --git a/test/ASTMerge/Inputs/class-template1.cpp b/test/ASTMerge/Inputs/class-template1.cpp
new file mode 100644
index 0000000..440b5abf
--- /dev/null
+++ b/test/ASTMerge/Inputs/class-template1.cpp
@@ -0,0 +1,34 @@
+template<typename T>
+struct X0;
+
+template<int I>
+struct X1;
+
+template<int I>
+struct X2;
+
+template<int I>
+struct X3;
+
+template<template<int I> class>
+struct X4;
+
+template<template<long> class>
+struct X5;
+
+template<typename>
+struct X6;
+
+extern X0<int> *x0i;
+extern X0<long> *x0l;
+extern X0<float> *x0r;
+
+template<>
+struct X0<char> {
+ int member;
+};
+
+template<>
+struct X0<wchar_t> {
+ int member;
+};
diff --git a/test/ASTMerge/Inputs/class-template2.cpp b/test/ASTMerge/Inputs/class-template2.cpp
new file mode 100644
index 0000000..6300301
--- /dev/null
+++ b/test/ASTMerge/Inputs/class-template2.cpp
@@ -0,0 +1,35 @@
+template<class T>
+struct X0;
+
+template<int I>
+struct X1;
+
+template<long I>
+struct X2;
+
+template<typename>
+struct X3;
+
+template<template<int I> class>
+struct X4;
+
+template<template<int I> class>
+struct X5;
+
+template<template<int I> class>
+struct X6;
+
+typedef int Integer;
+extern X0<Integer> *x0i;
+extern X0<float> *x0f;
+extern X0<double> *x0r;
+
+template<>
+struct X0<char> {
+ int member;
+};
+
+template<>
+struct X0<wchar_t> {
+ float member;
+};
diff --git a/test/ASTMerge/Inputs/class1.cpp b/test/ASTMerge/Inputs/class1.cpp
index e13faf0..b600cdb 100644
--- a/test/ASTMerge/Inputs/class1.cpp
+++ b/test/ASTMerge/Inputs/class1.cpp
@@ -6,3 +6,10 @@ struct B : A {
float y;
float foo();
};
+
+struct C {
+ C(int i = 10);
+ C(const C&);
+ C &operator=(C&);
+ ~C();
+};
diff --git a/test/ASTMerge/Inputs/class2.cpp b/test/ASTMerge/Inputs/class2.cpp
index 91b84dc..fa38916 100644
--- a/test/ASTMerge/Inputs/class2.cpp
+++ b/test/ASTMerge/Inputs/class2.cpp
@@ -6,3 +6,4 @@ struct B : A {
int y;
int foo();
};
+
diff --git a/test/ASTMerge/Inputs/interface1.m b/test/ASTMerge/Inputs/interface1.m
index 7e9935d..5865c0e 100644
--- a/test/ASTMerge/Inputs/interface1.m
+++ b/test/ASTMerge/Inputs/interface1.m
@@ -79,3 +79,25 @@
@protocol P4
- (double)honk:(int)a;
@end
+
+// Interface with implementation
+@interface I13
+@end
+
+@implementation I13
+@end
+
+@interface I13a
+@end
+
+@implementation I13a
+@end
+
+// Implementation by itself
+@implementation I14 : I12
+@end
+
+@implementation I15 : I12
+@end
+
+
diff --git a/test/ASTMerge/Inputs/interface2.m b/test/ASTMerge/Inputs/interface2.m
index bef7fb8..3fb43f5 100644
--- a/test/ASTMerge/Inputs/interface2.m
+++ b/test/ASTMerge/Inputs/interface2.m
@@ -78,3 +78,23 @@
@protocol P5
- (double)honk:(int)a;
@end
+
+// Interface with implementation
+@interface I13
+@end
+
+@implementation I13
+@end
+
+@interface I13b
+@end
+
+@implementation I13b
+@end
+
+// Implementation by itself
+@implementation I14 : I12
+@end
+
+@implementation I15 : I11
+@end
diff --git a/test/ASTMerge/Inputs/property1.m b/test/ASTMerge/Inputs/property1.m
index 37887a3..22fe0a0 100644
--- a/test/ASTMerge/Inputs/property1.m
+++ b/test/ASTMerge/Inputs/property1.m
@@ -10,3 +10,22 @@
@property (readonly) float Prop1;
@end
+// Properties with implementations
+@interface I3 {
+ int ivar1;
+ int ivar2;
+ int ivar3;
+ int Prop4;
+}
+@property int Prop1;
+@property int Prop2;
+@property int Prop3;
+@property int Prop4;
+@end
+
+@implementation I3
+@synthesize Prop1 = ivar1;
+@synthesize Prop2 = ivar3;
+@dynamic Prop3;
+@synthesize Prop4;
+@end
diff --git a/test/ASTMerge/Inputs/property2.m b/test/ASTMerge/Inputs/property2.m
index 6039f10..64a03fb 100644
--- a/test/ASTMerge/Inputs/property2.m
+++ b/test/ASTMerge/Inputs/property2.m
@@ -11,3 +11,23 @@
@interface I2
@property (readonly) int Prop1;
@end
+
+// Properties with implementations
+@interface I3 {
+ int ivar1;
+ int ivar2;
+ int ivar3;
+ int Prop4;
+}
+@property int Prop1;
+@property int Prop2;
+@property int Prop3;
+@property int Prop4;
+@end
+
+@implementation I3
+@synthesize Prop2 = ivar2;
+@synthesize Prop1 = ivar1;
+@synthesize Prop3 = ivar3;
+@synthesize Prop4 = Prop4;
+@end
OpenPOWER on IntegriCloud