Dmitri Gribenko | 6ebf091 | 2013-02-22 14:21:27 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: mkdir %t |
| 3 | |
| 4 | // Check that custom block commands are defined correctly. |
| 5 | // RUN: %clang_cc1 -fcomment-block-commands=CustomCommand -x c++ -std=c++11 -emit-pch -o %t/out.pch %s |
| 6 | // RUN: %clang_cc1 -x c++ -std=c++11 -fcomment-block-commands=CustomCommand -include-pch %t/out.pch -fsyntax-only %s |
| 7 | |
| 8 | // 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 | // RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch |
| 10 | |
| 11 | // RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct |
| 12 | // RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch |
| 13 | |
| 14 | // Ensure that XML is not invalid |
| 15 | // WRONG-NOT: CommentXMLInvalid |
| 16 | |
| 17 | // RUN: FileCheck %s < %t/out.c-index-direct |
| 18 | // RUN: FileCheck %s < %t/out.c-index-pch |
| 19 | |
NAKAMURA Takumi | 4eaa81b | 2013-07-08 12:00:29 +0000 | [diff] [blame] | 20 | // XFAIL: vg_leak |
Dmitri Gribenko | 6ebf091 | 2013-02-22 14:21:27 +0000 | [diff] [blame] | 21 | |
| 22 | #ifndef HEADER |
| 23 | #define HEADER |
| 24 | |
| 25 | /// \CustomCommand Aaa. |
| 26 | void comment_custom_block_command_1(); |
| 27 | |
| 28 | // 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 | // CHECK-NEXT: CommentAST=[ |
| 30 | // CHECK-NEXT: (CXComment_FullComment |
| 31 | // CHECK-NEXT: (CXComment_Paragraph IsWhitespace |
| 32 | // CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)) |
| 33 | // CHECK-NEXT: (CXComment_BlockCommand CommandName=[CustomCommand] |
| 34 | // CHECK-NEXT: (CXComment_Paragraph |
| 35 | // CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))] |
| 36 | |
| 37 | #endif |
| 38 | |