From b64e95f49ea3197fc453c6986adf5f8941a0d104 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 24 Jul 2013 22:58:51 +0000 Subject: Documentation parsing: if typedef name is being declared via a macro, try using declaration's starting location. This is improvement over not having a valid location and dropping comment altogether. // rdar://14348912 llvm-svn: 187085 --- clang/test/Index/comment-to-html-xml-conversion.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'clang/test/Index/comment-to-html-xml-conversion.cpp') diff --git a/clang/test/Index/comment-to-html-xml-conversion.cpp b/clang/test/Index/comment-to-html-xml-conversion.cpp index b70259a..ed25c50 100644 --- a/clang/test/Index/comment-to-html-xml-conversion.cpp +++ b/clang/test/Index/comment-to-html-xml-conversion.cpp @@ -811,5 +811,16 @@ void comment_to_xml_conversion_todo_3(); void comment_to_xml_conversion_todo_4(); // CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_todo_4:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_todo_4c:@F@comment_to_xml_conversion_todo_4#void comment_to_xml_conversion_todo_4() Aaa. Bbb. Ccc.] +// rdar://14348912 +#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type + +/**! Documentation comment */ +typedef NS_ENUM(int, Color) { Red, Green, Blue }; +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:22: TypedefDecl=Color:[[@LINE-1]]:22 +// CHECK-NEXT: CommentAST=[ +// CHECK-NEXT: (CXComment_FullComment +// CHECK-NEXT: (CXComment_Paragraph +// CHECK-NEXT: (CXComment_Text Text=[! Documentation comment ])))] + #endif -- cgit v1.1