forked from qt-creator/qt-creator
Clang: Optimize clang overview model
Build the tree in only one loop. clangbackend generates tokens almost as fast as it did before (about 10% slower in general). Broken documents are more affected and take much more time (about 300%) but it's better to have this time spent on backend side then in QtC itself. Task-number: QTCREATORBUG-20205 Change-Id: I34c58bca30c4494005a029abd82c7e612ecd6fb9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -1354,6 +1354,14 @@ TEST_F(TokenProcessor, AnonymousStruct)
|
||||
ASSERT_THAT(container.types.mixinHighlightingTypes[0], ClangBackEnd::HighlightingType::Struct);
|
||||
}
|
||||
|
||||
TEST_F(TokenProcessor, LexicalParentIndex)
|
||||
{
|
||||
const auto containers = translationUnit.fullTokenInfosInRange(
|
||||
translationUnit.sourceRange(50, 1, 53, 3)).toTokenInfoContainers();
|
||||
|
||||
ASSERT_THAT(containers[3].extraInfo.lexicalParentIndex, 1);
|
||||
}
|
||||
|
||||
Data *TokenProcessor::d;
|
||||
|
||||
void TokenProcessor::SetUpTestCase()
|
||||
|
||||
Reference in New Issue
Block a user