forked from qt-creator/qt-creator
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:
@@ -80,16 +80,12 @@ void buildTree(const TokenContainers &containers,
|
|||||||
if (lexicalParentIndex >= 0 && treeItemCache[lexicalParentIndex])
|
if (lexicalParentIndex >= 0 && treeItemCache[lexicalParentIndex])
|
||||||
parent = 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;
|
ClangBackEnd::HighlightingType parentType = parent->token.types.mainHighlightingType;
|
||||||
if (parentType == ClangBackEnd::HighlightingType::VirtualFunction
|
if (parentType == ClangBackEnd::HighlightingType::VirtualFunction
|
||||||
|| parentType == ClangBackEnd::HighlightingType::Function) {
|
|| parentType == ClangBackEnd::HighlightingType::Function) {
|
||||||
// Treat static and extern variables inside a function scope as local variables.
|
// Treat everything inside a function scope as local variables.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
parent->appendChild(item.release());
|
parent->appendChild(item.release());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user