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,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());
|
||||
|
||||
Reference in New Issue
Block a user