forked from qt-creator/qt-creator
ClangCodeModel: Fix template highlighting bug
We need to take into account that the ">>" in constructs such as std::vector<std::pair<int, int>> is only one token on the clang side. Change-Id: I90f002ca56f236032f6d39c338593a2ff7590061 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1794,6 +1794,13 @@ TEST_F(TokenProcessor, TemplateSeparateDeclDef)
|
||||
ASSERT_THAT(infos[37], IsHighlightingMark(764u, 5u, 9u, HighlightingType::GlobalVariable));
|
||||
}
|
||||
|
||||
TEST_F(TokenProcessor, NestedTemplate)
|
||||
{
|
||||
const auto infos = translationUnit.tokenInfosInRange(sourceRange(773, 44));
|
||||
ASSERT_THAT(infos[12], HasTwoTypes(HighlightingType::Punctuation,
|
||||
HighlightingType::DoubleAngleBracketClose));
|
||||
}
|
||||
|
||||
Data *TokenProcessor::d;
|
||||
|
||||
void TokenProcessor::SetUpTestCase()
|
||||
|
||||
Reference in New Issue
Block a user