Use #line directive to enforce matching line numbers

clang preprocessing output is different on Windows for some reason...
This commit is contained in:
Jonathan Müller 2017-10-10 22:07:36 +02:00
commit 845ef61017
2 changed files with 8 additions and 34 deletions

View file

@ -80,7 +80,7 @@ void detail::comment_context::match(cpp_entity& e, const CXCursor& cur) const
{
auto pos = clang_getRangeStart(clang_getCursorExtent(cur));
unsigned line;
clang_getSpellingLocation(pos, nullptr, &line, nullptr, nullptr);
clang_getPresumedLocation(pos, nullptr, &line, nullptr);
match(e, line);
}