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]) if (lexicalParentIndex >= 0 && treeItemCache[lexicalParentIndex])
parent = treeItemCache[lexicalParentIndex]; parent = treeItemCache[lexicalParentIndex];
if (parent != root ClangBackEnd::HighlightingType parentType = parent->token.types.mainHighlightingType;
&& (container.extraInfo.storageClass == ClangBackEnd::StorageClass::Extern if (parentType == ClangBackEnd::HighlightingType::VirtualFunction
|| container.extraInfo.storageClass == ClangBackEnd::StorageClass::Static)) { || parentType == ClangBackEnd::HighlightingType::Function) {
ClangBackEnd::HighlightingType parentType = parent->token.types.mainHighlightingType; // Treat everything inside a function scope as local variables.
if (parentType == ClangBackEnd::HighlightingType::VirtualFunction continue;
|| parentType == ClangBackEnd::HighlightingType::Function) {
// Treat static and extern variables inside a function scope as local variables.
continue;
}
} }
parent->appendChild(item.release()); parent->appendChild(item.release());