1 // Run lines are sensitive to line numbers and come below the code. 2 3 #ifndef HEADER 4 #define HEADER 5 6 // Not a Doxygen comment. notdoxy1 NOT_DOXYGEN 7 void notdoxy1(void); 8 9 /* Not a Doxygen comment. notdoxy2 NOT_DOXYGEN */ 10 void notdoxy2(void); 11 12 /*/ Not a Doxygen comment. notdoxy3 NOT_DOXYGEN */ 13 void notdoxy3(void); 14 15 /** Doxygen comment. isdoxy4 IS_DOXYGEN_SINGLE */ 16 void isdoxy4(void); 17 18 /*! Doxygen comment. isdoxy5 IS_DOXYGEN_SINGLE */ 19 void isdoxy5(void); 20 21 /// Doxygen comment. isdoxy6 IS_DOXYGEN_SINGLE 22 void isdoxy6(void); 23 24 /* BLOCK_ORDINARY_COMMENT */ 25 // ORDINARY COMMENT 26 /// This is a BCPL comment. IS_DOXYGEN_START 27 /// It has only two lines. 28 /** But there are other blocks that are part of the comment, too. IS_DOXYGEN_END */ 29 void multi_line_comment_plus_ordinary(int); 30 31 // MULTILINE COMMENT 32 // 33 // WITH EMPTY LINE 34 void multi_line_comment_empty_line(int); 35 36 #endif 37 38 // RUN: rm -rf %t 39 // RUN: mkdir %t 40 41 // RUN: %clang_cc1 -fparse-all-comments -x c++ -std=c++11 -emit-pch -o %t/out.pch %s 42 43 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -std=c++11 -fparse-all-comments > %t/out.c-index-direct 44 // RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch 45 46 // RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct 47 // RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch 48 49 // Ensure that XML is not invalid 50 // WRONG-NOT: CommentXMLInvalid 51 52 // RUN: FileCheck %s < %t/out.c-index-direct 53 // RUN: FileCheck %s < %t/out.c-index-pch 54 55 // CHECK: parse-all-comments.c:7:6: FunctionDecl=notdoxy1:{{.*}} notdoxy1 NOT_DOXYGEN 56 // CHECK: parse-all-comments.c:10:6: FunctionDecl=notdoxy2:{{.*}} notdoxy2 NOT_DOXYGEN 57 // CHECK: parse-all-comments.c:13:6: FunctionDecl=notdoxy3:{{.*}} notdoxy3 NOT_DOXYGEN 58 // CHECK: parse-all-comments.c:16:6: FunctionDecl=isdoxy4:{{.*}} isdoxy4 IS_DOXYGEN_SINGLE 59 // CHECK: parse-all-comments.c:19:6: FunctionDecl=isdoxy5:{{.*}} isdoxy5 IS_DOXYGEN_SINGLE 60 // CHECK: parse-all-comments.c:22:6: FunctionDecl=isdoxy6:{{.*}} isdoxy6 IS_DOXYGEN_SINGLE 61 // CHECK: parse-all-comments.c:29:6: FunctionDecl=multi_line_comment_plus_ordinary:{{.*}} BLOCK_ORDINARY_COMMENT {{.*}} ORDINARY COMMENT {{.*}} IS_DOXYGEN_START {{.*}} IS_DOXYGEN_END 62 // CHECK: parse-all-comments.c:34:6: FunctionDecl=multi_line_comment_empty_line:{{.*}} MULTILINE COMMENT{{.*}}\n{{.*}}\n{{.*}} WITH EMPTY LINE 63