Parsing, semantic analysis, and AST for Objective-C type parameters.
Produce type parameter declarations for Objective-C type parameters,
and attach lists of type parameters to Objective-C classes,
categories, forward declarations, and extensions as
appropriate. Perform semantic analysis of type bounds for type
parameters, both in isolation and across classes/categories/extensions
to ensure consistency.
Also handle (de-)serialization of Objective-C type parameter lists,
along with sundry other things one must do to add a new declaration to
Clang.
Note that Objective-C type parameters are typedef name declarations,
like typedefs and C++11 type aliases, in support of type erasure.
Part of rdar://problem/6294649.
llvm-svn: 241541
2015-07-07 11:57:15 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: mkdir %t
|
|
|
|
// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng -target x86_64-apple-darwin10 %s > %t/out
|
|
|
|
// RUN: FileCheck %s < %t/out
|
|
|
|
|
|
|
|
// Ensure that XML we generate is not invalid.
|
|
|
|
// RUN: FileCheck %s -check-prefix=WRONG < %t/out
|
|
|
|
// WRONG-NOT: CommentXMLInvalid
|
|
|
|
|
|
|
|
@protocol NSObject
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSObject
|
|
|
|
@end
|
|
|
|
|
2018-04-13 00:00:05 +08:00
|
|
|
// CHECK: <Declaration>@interface A<__covariant T : id, U : NSObject *> : NSObject
|
Parsing, semantic analysis, and AST for Objective-C type parameters.
Produce type parameter declarations for Objective-C type parameters,
and attach lists of type parameters to Objective-C classes,
categories, forward declarations, and extensions as
appropriate. Perform semantic analysis of type bounds for type
parameters, both in isolation and across classes/categories/extensions
to ensure consistency.
Also handle (de-)serialization of Objective-C type parameter lists,
along with sundry other things one must do to add a new declaration to
Clang.
Note that Objective-C type parameters are typedef name declarations,
like typedefs and C++11 type aliases, in support of type erasure.
Part of rdar://problem/6294649.
llvm-svn: 241541
2015-07-07 11:57:15 +08:00
|
|
|
/// A
|
2015-07-07 11:58:54 +08:00
|
|
|
@interface A<__covariant T : id, U : NSObject *> : NSObject
|
Parsing, semantic analysis, and AST for Objective-C type parameters.
Produce type parameter declarations for Objective-C type parameters,
and attach lists of type parameters to Objective-C classes,
categories, forward declarations, and extensions as
appropriate. Perform semantic analysis of type bounds for type
parameters, both in isolation and across classes/categories/extensions
to ensure consistency.
Also handle (de-)serialization of Objective-C type parameter lists,
along with sundry other things one must do to add a new declaration to
Clang.
Note that Objective-C type parameters are typedef name declarations,
like typedefs and C++11 type aliases, in support of type erasure.
Part of rdar://problem/6294649.
llvm-svn: 241541
2015-07-07 11:57:15 +08:00
|
|
|
@end
|
2015-10-01 08:53:13 +08:00
|
|
|
|
|
|
|
// CHECK: <Declaration>@interface AA : A <id, NSObject *>
|
|
|
|
/// AA
|
|
|
|
@interface AA : A<id, NSObject *>
|
|
|
|
@end
|