| Issue |
202610
|
| Summary |
warn-documentation.cpp test produces CommentXMLInvalid after c241374079
|
| Labels |
clang:diagnostics
|
| Assignees |
|
| Reporter |
jmorse
|
G'day,
The clang test clang/test/Sema/warn-documentation.cpp was updated in c241374079, after which it's begun failing on our internal Sony buildbot, but not on anything public (apparently). The specific error text:
```
// CHECK: warn-documentation.cpp:1555:9: ConceptDecl=bar:1555:9 (Definition) RawComment=[/// @tparam T Derived class.\n/// @tparam TBase Base class.] RawCommentRange=[1552:1 - 1553:30] FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">T</dt><dd class="tparam-descr-index-0"> Derived class. </dd><dt class="tparam-name-index-1">TBase</dt><dd class="tparam-descr-index-1"> Base class.</dd></dl>] FullCommentAsXML=[<Concept file="../clang/test/Sema/warn-documentation.cpp" line="1555" column="9"><Name>bar</Name><USR>c:@N@GH64087@CT@bar</USR><Declaration>template <typename T, typename TBase>\nconcept bar = true</Declaration><TemplateParameters><Parameter><Name>T</Name><Index>0</Index><Discussion><Para> Derived class. </Para></Discussion></Parameter><Parameter><Name>TBase</Name><Index>1</Index><Discussion><Para> Base class.</Para></Discussion></Parameter></TemplateParameters></Concept>] CommentXMLInvalid [not valid XML: Did not expect element Concept there
```
...at the far end of which it says "Did not expect element Concept there". I believe this is because the schema file at `clang/bindings/xml/comment-xml-schema.rng` doesn't define the layout of a `Concept` element. Adding one manually causes the test to pass -- I would send it as a patch, but I don't know anything about XML schemas and I'm well out of my depth here.
My local build wouldn't initially replicate this despite having all the "enable libxml" flags on, and it finding the various appropriate headers. On Ubuntu 24.04, I had to install `libxml++2.6-dev` in addition to the normal `libxml2-dev` before the config flag `CLANG_HAVE_LIBXML` was set. Without that, the `ValidateCommentXML` function in c-index-test function isn't compiled, and the tests pass vacuously.
(CC @evelez7 )
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs