forked from qt-creator/qt-creator
clangbackend: Try harder to get the proper cursor
... in cases where it appears that clang_annotateTokens() did not do what we wanted. Fixes: QTCREATORBUG-21522 Change-Id: I272061cb6c4b51a5d779ace5b4e06912c0a386e5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1769,6 +1769,13 @@ TEST_F(TokenProcessor, StructuredBinding)
|
||||
ASSERT_THAT(infos[5], IsHighlightingMark(737u, 20u, 1u, HighlightingType::LocalVariable));
|
||||
}
|
||||
|
||||
TEST_F(TokenProcessor, IndirectMacro)
|
||||
{
|
||||
const auto infos = translationUnit.tokenInfosInRange(sourceRange(746, 32));
|
||||
|
||||
ASSERT_THAT(infos[5], IsHighlightingMark(746u, 20u, 10u, HighlightingType::LocalVariable));
|
||||
}
|
||||
|
||||
Data *TokenProcessor::d;
|
||||
|
||||
void TokenProcessor::SetUpTestCase()
|
||||
|
||||
Reference in New Issue
Block a user