1*f4a2713aSLionel Sambuc // RUN: rm -rf %t 2*f4a2713aSLionel Sambuc // RUN: mkdir %t 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc // Check that custom block commands are defined correctly. 5*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fcomment-block-commands=CustomCommand -x c++ -std=c++11 -emit-pch -o %t/out.pch %s 6*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -x c++ -std=c++11 -fcomment-block-commands=CustomCommand -include-pch %t/out.pch -fsyntax-only %s 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 -fcomment-block-commands=CustomCommand > %t/out.c-index-direct 9*f4a2713aSLionel Sambuc // RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc // RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct 12*f4a2713aSLionel Sambuc // RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc // Ensure that XML is not invalid 15*f4a2713aSLionel Sambuc // WRONG-NOT: CommentXMLInvalid 16*f4a2713aSLionel Sambuc 17*f4a2713aSLionel Sambuc // RUN: FileCheck %s < %t/out.c-index-direct 18*f4a2713aSLionel Sambuc // RUN: FileCheck %s < %t/out.c-index-pch 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc // XFAIL: vg_leak 21*f4a2713aSLionel Sambuc 22*f4a2713aSLionel Sambuc #ifndef HEADER 23*f4a2713aSLionel Sambuc #define HEADER 24*f4a2713aSLionel Sambuc 25*f4a2713aSLionel Sambuc /// \CustomCommand Aaa. 26*f4a2713aSLionel Sambuc void comment_custom_block_command_1(); 27*f4a2713aSLionel Sambuc 28*f4a2713aSLionel Sambuc // CHECK: comment-custom-block-command.cpp:[[@LINE-2]]:6: FunctionDecl=comment_custom_block_command_1:{{.*}} FullCommentAsHTML=[<p> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-custom-block-command.cpp" line="[[@LINE-2]]" column="6"><Name>comment_custom_block_command_1</Name><USR>c:@F@comment_custom_block_command_1#</USR><Declaration>void comment_custom_block_command_1()</Declaration><Discussion><Para> Aaa.</Para></Discussion></Function>] 29*f4a2713aSLionel Sambuc // CHECK-NEXT: CommentAST=[ 30*f4a2713aSLionel Sambuc // CHECK-NEXT: (CXComment_FullComment 31*f4a2713aSLionel Sambuc // CHECK-NEXT: (CXComment_Paragraph IsWhitespace 32*f4a2713aSLionel Sambuc // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) 33*f4a2713aSLionel Sambuc // CHECK-NEXT: (CXComment_BlockCommand CommandName=[CustomCommand] 34*f4a2713aSLionel Sambuc // CHECK-NEXT: (CXComment_Paragraph 35*f4a2713aSLionel Sambuc // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))] 36*f4a2713aSLionel Sambuc 37*f4a2713aSLionel Sambuc #endif 38*f4a2713aSLionel Sambuc 39