From 9f805b7e8aad04f72203828b89f389f73a5ffcd7 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Thu, 22 Aug 2019 16:10:38 +0200 Subject: ClangRefactoring: Improve follow symbol and usage Change-Id: Idb42010443e4560489ef067e54d05b4e567598e9 Reviewed-by: Tim Jenssen --- src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/tools') diff --git a/src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp b/src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp index 00ad465bcc..9e8da8cdbf 100644 --- a/src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp +++ b/src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp @@ -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; } -- cgit v1.2.1