diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-06-27 10:47:16 +0200 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-06-28 09:11:39 +0000 |
commit | fcfa98ab7ce491808283b47780011acaa611a07d (patch) | |
tree | b4bebb2815ebd84a6f65a6d589fd44b243e75e7e | |
parent | ef9c68798d37a1c2e126f52e99acc2014eef62f9 (diff) |
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>
-rw-r--r-- | src/tools/clangbackend/source/tokenprocessor.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/clangbackend/source/tokenprocessor.h b/src/tools/clangbackend/source/tokenprocessor.h index 4c6fbd995d..aeac7dc01c 100644 --- a/src/tools/clangbackend/source/tokenprocessor.h +++ b/src/tools/clangbackend/source/tokenprocessor.h @@ -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; } |