// 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 %s > %t/out // RUN: FileCheck %s < %t/out // rdar://13067629 // Ensure that XML we generate is not invalid. // RUN: FileCheck %s -check-prefix=WRONG < %t/out // WRONG-NOT: CommentXMLInvalid /** Documentation for NSUInteger */ typedef unsigned int NSUInteger; /** Documentation for MyEnum */ typedef enum : NSUInteger { MyEnumFoo, /**< value Foo */ MyEnumBar, /**< value Bar */ MyEnumBaz, /**< value Baz */ } MyEnum; // CHECK: TypedefDecl=MyEnum:[[@LINE-1]]:3 (Definition) FullCommentAsHTML=[

Documentation for MyEnum

] FullCommentAsXML=[<anonymous>c:@EA@MyEnumtypedef enum MyEnum MyEnum Documentation for MyEnum ] /** Documentation for E */ enum E { E_MyEnumFoo, /**< value Foo */ E_MyEnumBar, /**< value Bar */ E_MyEnumBaz, /**< value Baz */ }; typedef enum E E_T; // CHECK: EnumDecl=E:[[@LINE-6]]:6 (Definition) {{.*}} BriefComment=[Documentation for E] FullCommentAsHTML=[

Documentation for E

] FullCommentAsXML=[Ec:@E@Eenum E{{( : int)?}} {} Documentation for E ] // CHECK: TypedefDecl=E_T:[[@LINE-2]]:16 (Definition) FullCommentAsHTML=[

Documentation for E

] FullCommentAsXML=[Ec:@E@Etypedef enum E E_T Documentation for E ] /** Comment about Foo */ typedef struct { int iii; } Foo; // CHECK: TypedefDecl=Foo:[[@LINE-1]]:11 (Definition) FullCommentAsHTML=[

Comment about Foo

] FullCommentAsXML=[<anonymous>c:@SA@Footypedef struct Foo Foo Comment about Foo ] // CHECK: StructDecl=:[[@LINE-4]]:9 (Definition) {{.*}} BriefComment=[Comment about Foo] FullCommentAsHTML=[

Comment about Foo

] FullCommentAsXML=[<anonymous>c:@SA@Foostruct {} Comment about Foo ] struct Foo1 { int iii; }; /** About Foo1T */ typedef struct Foo1 Foo1T; // FIXME: we don't attach this comment to 'struct Foo1' // CHECK: TypedefDecl=Foo1T:[[@LINE-2]]:21 (Definition) {{.*}} FullCommentAsHTML=[

About Foo1T

] FullCommentAsXML=[Foo1Tc:annotate-comments-typedef.m@T@Foo1Ttypedef struct Foo1 Foo1T About Foo1T ]