ClangRefactoring: Improve follow symbol and usage

Change-Id: Idb42010443e4560489ef067e54d05b4e567598e9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2019-08-22 16:10:38 +02:00
parent c174eb378a
commit 9f805b7e8a
19 changed files with 324 additions and 53 deletions

View File

@@ -52,12 +52,12 @@ Utils::SmallString symbolName(const clang::NamedDecl *declaration)
SourceLocationKind sourceLocationKind(clang::index::SymbolRoleSet roles)
{
if (hasSymbolRole(clang::index::SymbolRole::Reference, roles))
return SourceLocationKind::DeclarationReference;
if (hasSymbolRole(clang::index::SymbolRole::Definition, roles))
return SourceLocationKind::Definition;
else if (hasSymbolRole(clang::index::SymbolRole::Declaration, roles))
return SourceLocationKind::Declaration;
else if (hasSymbolRole(clang::index::SymbolRole::Definition, roles))
return SourceLocationKind::Definition;
else if (hasSymbolRole(clang::index::SymbolRole::Reference, roles))
return SourceLocationKind::DeclarationReference;
return SourceLocationKind::None;
}