forked from qt-creator/qt-creator
Clang: Fix comma-separated class members in symbol outline
Check for the actual lexical parent in addition to ranges. Task-number: QTCREATORBUG-20656 Change-Id: Ie2ead5cd02e83f9fd201825ee80d1633679a6402 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -159,6 +159,10 @@ QVector<TokenInfoContainer> TokenProcessor<FullTokenInfo>::toTokenInfoContainers
|
||||
if (it->m_extraInfo.declaration && !it->hasMainType(HighlightingType::LocalVariable)
|
||||
&& it->m_originalCursor != token.m_originalCursor
|
||||
&& it->m_extraInfo.cursorRange.contains(tokenStart)) {
|
||||
if (token.m_originalCursor.lexicalParent() != it->m_originalCursor
|
||||
&& !token.hasMainType(HighlightingType::QtProperty)) {
|
||||
continue;
|
||||
}
|
||||
token.m_extraInfo.lexicalParentIndex = std::distance(it, tokens.rend()) - 1;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user