diff options
author | Marco Bubke <marco.bubke@qt.io> | 2019-08-22 16:10:38 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2019-08-27 11:53:45 +0000 |
commit | 9f805b7e8aad04f72203828b89f389f73a5ffcd7 (patch) | |
tree | 914959e9a44677f10be6481de659db363bd0a1e9 /src/tools | |
parent | c174eb378a7957b8b123e2054cce0e166842a8aa (diff) | |
download | qt-creator-9f805b7e8aad04f72203828b89f389f73a5ffcd7.tar.gz |
ClangRefactoring: Improve follow symbol and usage
Change-Id: Idb42010443e4560489ef067e54d05b4e567598e9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/clangrefactoringbackend/source/indexdataconsumer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |