brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · bb153dc Raw
40 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir %t3 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 %s6// RUN: %clang_cc1 -x c++ -std=c++11 -fcomment-block-commands=CustomCommand -include-pch %t/out.pch -fsyntax-only %s7 8// RUN: c-index-test -write-pch %t/out.pch -fcomment-block-commands=CustomCommand -x c++ -std=c++11 %s9// 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-direct10// RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch11 12// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct13// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch14 15// Ensure that XML is not invalid16// WRONG-NOT: CommentXMLInvalid17 18// RUN: FileCheck %s < %t/out.c-index-direct19// RUN: FileCheck %s < %t/out.c-index-pch20 21// XFAIL: vg_leak22 23#ifndef HEADER24#define HEADER25 26/// \CustomCommand Aaa.27void comment_custom_block_command_1();28 29// 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>]30// CHECK-NEXT:  CommentAST=[31// CHECK-NEXT:    (CXComment_FullComment32// CHECK-NEXT:       (CXComment_Paragraph IsWhitespace33// CHECK-NEXT:         (CXComment_Text Text=[ ] IsWhitespace))34// CHECK-NEXT:       (CXComment_BlockCommand CommandName=[CustomCommand]35// CHECK-NEXT:         (CXComment_Paragraph36// CHECK-NEXT:           (CXComment_Text Text=[ Aaa.]))))]37 38#endif39 40