forked from qt-creator/qt-creator
ClangRefactoring: Improve follow symbol and usage
Change-Id: Idb42010443e4560489ef067e54d05b4e567598e9 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user