summaryrefslogtreecommitdiff
path: root/test/ASTMerge
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-08 16:41:55 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-08 16:41:55 +0000
commitcad2c59b0c087edea83d0fbf6eabde4a7960c778 (patch)
tree9ae7731f2084bd427a7243eb564628bc0ca2757b /test/ASTMerge
parent0a03a3f98b14006a54bcac9e8908a7c9f50e519f (diff)
downloadclang-cad2c59b0c087edea83d0fbf6eabde4a7960c778.tar.gz
Fix two thinkos and add a test for importing the AST of a category
implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ASTMerge')
-rw-r--r--test/ASTMerge/Inputs/category1.m14
-rw-r--r--test/ASTMerge/Inputs/category2.m14
-rw-r--r--test/ASTMerge/category.m4
3 files changed, 31 insertions, 1 deletions
diff --git a/test/ASTMerge/Inputs/category1.m b/test/ASTMerge/Inputs/category1.m
index 6d4fd8d9f2..afcaab81f2 100644
--- a/test/ASTMerge/Inputs/category1.m
+++ b/test/ASTMerge/Inputs/category1.m
@@ -28,7 +28,21 @@
@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 646ebb557a..49a3c270a1 100644
--- a/test/ASTMerge/Inputs/category2.m
+++ b/test/ASTMerge/Inputs/category2.m
@@ -30,6 +30,20 @@ typedef int Int;
@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/category.m b/test/ASTMerge/category.m
index 6ba2292041..54a12408c4 100644
--- a/test/ASTMerge/category.m
+++ b/test/ASTMerge/category.m
@@ -6,4 +6,6 @@
// CHECK: category1.m:16:1: note: instance method 'method2' also declared here
// CHECK: category2.m:26:1: error: instance method 'method3' has incompatible result types in different translation units ('float' vs. 'int')
// CHECK: category1.m:24:1: note: instance method 'method3' also declared here
-// CHECK: 2 errors generated.
+// CHECK: category2.m:48:1: error: instance method 'blah' has incompatible result types in different translation units ('int' vs. 'float')
+// CHECK: category1.m:46:1: note: instance method 'blah' also declared here
+// CHECK: 3 errors generated.