]> granicus.if.org Git - clang/commitdiff
[ASTImporter] Add test for ObjCTypeParamDecl
authorRaphael Isemann <teemperor@gmail.com>
Wed, 22 Aug 2018 22:48:40 +0000 (22:48 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Wed, 22 Aug 2018 22:48:40 +0000 (22:48 +0000)
Reviewers: a.sidorin, a_sidorin

Reviewed By: a_sidorin

Subscribers: martong, cfe-commits

Differential Revision: https://reviews.llvm.org/D51059

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340465 91177308-0d34-0410-b5e6-96231b3b80d8

test/Import/objc-param-decl/Inputs/S.m [new file with mode: 0644]
test/Import/objc-param-decl/test.m [new file with mode: 0644]

diff --git a/test/Import/objc-param-decl/Inputs/S.m b/test/Import/objc-param-decl/Inputs/S.m
new file mode 100644 (file)
index 0000000..6364cfa
--- /dev/null
@@ -0,0 +1,5 @@
+@protocol NSString
+@end
+
+@interface Dictionary <FirstParam : id <NSString>, NSString>
+@end
diff --git a/test/Import/objc-param-decl/test.m b/test/Import/objc-param-decl/test.m
new file mode 100644 (file)
index 0000000..ce05b01
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: clang-import-test -dump-ast -x objective-c++ -import %S/Inputs/S.m -expression %s | FileCheck %s
+
+// CHECK: ObjCTypeParamDecl
+// CHECK-SAME: FirstParam
+// CHECK-SAME: 'id<NSString>'
+// CHECK-NEXT: ObjCTypeParamDecl
+// CHECK-SAME: 'id':'id'
+
+void expr() {
+  Dictionary *d;
+}