MCPcopy Create free account
hub / github.com/KDE/kdevelop / toCXRange

Function toCXRange

plugins/clang/tests/test_clangutils.cpp:46–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44};
45
46CXSourceRange toCXRange(CXTranslationUnit unit, const DocumentRange& range)
47{
48 auto file = clang_getFile(unit, QString::fromUtf8(range.document.c_str(), range.document.length()).toUtf8());
49 auto begin = clang_getLocation(unit, file, range.start().line()+1, range.start().column()+1);
50 auto end = clang_getLocation(unit, file, range.end().line()+1, range.end().column()+1);
51 return clang_getRange(begin, end);
52}
53
54struct DisposeTranslationUnit {
55 void operator()(CXTranslationUnit unit) { clang_disposeTranslationUnit(unit); }

Callers 1

testGetRawContentsMethod · 0.85

Calls 6

c_strMethod · 0.45
lengthMethod · 0.45
lineMethod · 0.45
startMethod · 0.45
columnMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected