Clang: Do not show any function internals in symbol outline

Treat everything inside function scope the same way
as local variables.

Change-Id: I038d84e5e90057d65a08afc742ebcdf2de55ff85
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-06-05 13:20:19 +02:00
parent 27907bc417
commit bb0c681ff8

View File

@@ -80,15 +80,11 @@ void buildTree(const TokenContainers &containers,
if (lexicalParentIndex >= 0 && treeItemCache[lexicalParentIndex])
parent = treeItemCache[lexicalParentIndex];
if (parent != root
&& (container.extraInfo.storageClass == ClangBackEnd::StorageClass::Extern
|| container.extraInfo.storageClass == ClangBackEnd::StorageClass::Static)) {
ClangBackEnd::HighlightingType parentType = parent->token.types.mainHighlightingType;
if (parentType == ClangBackEnd::HighlightingType::VirtualFunction
|| parentType == ClangBackEnd::HighlightingType::Function) {
// Treat static and extern variables inside a function scope as local variables.
continue;
}
ClangBackEnd::HighlightingType parentType = parent->token.types.mainHighlightingType;
if (parentType == ClangBackEnd::HighlightingType::VirtualFunction
|| parentType == ClangBackEnd::HighlightingType::Function) {
// Treat everything inside a function scope as local variables.
continue;
}
parent->appendChild(item.release());