forked from qt-creator/qt-creator
Clang: Use built-in follow symbol for "ui_*" includes
Currently ClangCodeModel will follow to the temporary empty generated file instead of the proper "ui_*" header. Use built-in follow symbol for such includes until we fix the initial issue that requires these empty files. Task-number: QTCREATORBUG-20579 Change-Id: If67d21ea7b44889c93d3d41193403bade2dc330a Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -142,7 +142,12 @@ FollowSymbolResult FollowSymbol::followSymbol(CXTranslationUnit tu,
|
||||
CXFile file = clang_getIncludedFile(cursors[tokenIndex]);
|
||||
const ClangString filename(clang_getFileName(file));
|
||||
const SourceLocation loc(tu, filename, 1, 1);
|
||||
return SourceRangeContainer(SourceRange(loc, loc));
|
||||
FollowSymbolResult result;
|
||||
result.range = SourceRangeContainer(SourceRange(loc, loc));
|
||||
// CLANG-UPGRADE-CHECK: Remove if we don't use empty generated ui_* headers anymore.
|
||||
if (Utf8String(filename).contains("ui_"))
|
||||
result.isResultOnlyForFallBack = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
// For definitions we can always find a declaration in current TU
|
||||
|
||||
Reference in New Issue
Block a user