[breaking] Ensure matching line numbers after preprocessing

Unmatched documentation comments are not just a string, but also contain the line number as well.
This commit is contained in:
Jonathan Müller 2017-10-10 17:07:41 +02:00
commit 7c30ba7c46
4 changed files with 91 additions and 17 deletions

View file

@ -510,7 +510,7 @@ std::unique_ptr<cpp_file> libclang_parser::do_parse(const cpp_entity_index& idx,
for (auto& c : preprocessed.comments)
{
if (!c.comment.empty())
builder.add_unmatched_comment(std::move(c.comment));
builder.add_unmatched_comment(cpp_doc_comment(std::move(c.comment), c.line));
}
if (context.error)