Sometimes functions with large comment blocks in front of them have their declarations output on several lines by c-index-test. Hence the one-line function name/line/mangled pattern will not work to detect them. Break the pattern up into two patterns and keep state after seeing the name/line information until we finally see the mangled name.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This test:
/***********************************/ /* */ /* A test. */ /* */ /***********************************/ int foo(void) { return 1; } c-index-test -write-pch test.pch test.c c-index-test -test-print-mangle test.pch
Produces this:
FunctionDecl=foo:6:5 (Definition) RawComment=[/***********************************/] RawCommentRange=[5:1 - 5:38] BriefComment=[********************************] FullCommentAsHTML=[<p class="para-brief">********************************</p>] FullCommentAsXML=[<Function file="/ptmp/dag/test/test.c" line="6" column="5"><Name>foo</Name><USR>c:@F@foo</USR><Declaration>int foo()</Declaration><Abstract><Para>********************************</Para></Abstract></Function>] // CHECK: CommentAST=[ // CHECK: (CXComment_FullComment // CHECK: (CXComment_Paragraph // CHECK: (CXComment_Text Text=[********************************])))] [mangled=foo]
Note that mangled=foo appears on a separate line.