summaryrefslogtreecommitdiff
path: root/test/Import
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2017-07-25 19:54:22 +0000
committerSean Callanan <scallanan@apple.com>2017-07-25 19:54:22 +0000
commit0f53b50dc88bbfb4e5dd2267763a8dc430e0be63 (patch)
tree0bfbeab2c1561ae695ce0f87536c13954934201d /test/Import
parent315b9a701bc784ceae5e9807206454edef69ad96 (diff)
downloadclang-0f53b50dc88bbfb4e5dd2267763a8dc430e0be63.tar.gz
[ExternalASTMerger] Import Objective-C classes
This patch adds functionality and a test for importing Objective-C classes and their methods. It also adds a flag to clang-import-test to set the language used for parsing. This takes the same argument format as the -x option to the driver. Differential Revision: https://reviews.llvm.org/D35274 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309014 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Import')
-rw-r--r--test/Import/objc-method/Inputs/S.m4
-rw-r--r--test/Import/objc-method/test.m5
2 files changed, 9 insertions, 0 deletions
diff --git a/test/Import/objc-method/Inputs/S.m b/test/Import/objc-method/Inputs/S.m
new file mode 100644
index 0000000000..cf8ffaa602
--- /dev/null
+++ b/test/Import/objc-method/Inputs/S.m
@@ -0,0 +1,4 @@
+@interface C {
+}
+-(int)m;
+@end
diff --git a/test/Import/objc-method/test.m b/test/Import/objc-method/test.m
new file mode 100644
index 0000000000..7707110d82
--- /dev/null
+++ b/test/Import/objc-method/test.m
@@ -0,0 +1,5 @@
+// RUN: clang-import-test -x objective-c++ -import %S/Inputs/S.m -expression %s
+void expr() {
+ C *c;
+ int i = [c m];
+}