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

Method specialLanguageObjectRange

plugins/clang/clangsupport.cpp:303–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303KTextEditor::Range ClangSupport::specialLanguageObjectRange(const QUrl &url, const KTextEditor::Cursor& position)
304{
305 DUChainReadLocker lock;
306 const QPair<TopDUContextPointer, Use> macroExpansion = macroExpansionForPosition(url, position);
307 if (macroExpansion.first) {
308 return macroExpansion.first->transformFromLocalRevision(macroExpansion.second.m_range);
309 }
310
311 const QPair<TopDUContextPointer, KTextEditor::Range> import = importedContextForPosition(url, position);
312 if(import.first) {
313 return import.second;
314 }
315
316 return KTextEditor::Range::invalid();
317}
318
319QPair<QUrl, KTextEditor::Cursor> ClangSupport::specialLanguageObjectJumpCursor(const QUrl &url, const KTextEditor::Cursor& position)
320{

Callers 1

updateForViewMethod · 0.45

Calls 4

invalidFunction · 0.50

Tested by

no test coverage detected