forked from qt-creator/qt-creator
Clang: Partial fix for highlighting off output arguments
We get the source range for the parameter list and not the arguments in the initializer list back. So we have to disable the test case. Task-number: QTCREATORBUG-17101 Change-Id: I65ec6d111766b5728a951b024576cbf777c89728 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -363,6 +363,7 @@ HighlightingType HighlightingMark::punctuationKind(const Cursor &cursor)
|
||||
{
|
||||
switch (cursor.kind()) {
|
||||
case CXCursor_DeclRefExpr: return operatorKind(cursor);
|
||||
case CXCursor_Constructor:
|
||||
case CXCursor_CallExpr: collectOutputArguments(cursor);
|
||||
default: return HighlightingType::Invalid;
|
||||
}
|
||||
|
||||
@@ -539,3 +539,12 @@ void f31()
|
||||
|
||||
NonConstReferenceArgumentConstructor copy(instance);
|
||||
}
|
||||
|
||||
struct NonConstReferenceMemberInitialization
|
||||
{
|
||||
NonConstReferenceMemberInitialization(int &foo)
|
||||
: foo(foo)
|
||||
{}
|
||||
|
||||
int &foo;
|
||||
};
|
||||
|
||||
@@ -1080,6 +1080,16 @@ TEST_F(HighlightingMarks, DISABLED_NonConstReferenceArgumentConstructor)
|
||||
HasTwoTypes(HighlightingType::LocalVariable, HighlightingType::OutputArgument));
|
||||
}
|
||||
|
||||
TEST_F(HighlightingMarks, DISABLED_NonConstReferenceMemberInitialization)
|
||||
{
|
||||
const auto infos = translationUnit.highlightingMarksInRange(sourceRange(546, 19));
|
||||
|
||||
infos[2];
|
||||
|
||||
ASSERT_THAT(infos[3],
|
||||
HasTwoTypes(HighlightingType::LocalVariable, HighlightingType::OutputArgument));
|
||||
}
|
||||
|
||||
TEST_F(HighlightingMarks, DISABLED_EnumerationTypeDef)
|
||||
{
|
||||
const auto infos = translationUnit.highlightingMarksInRange(sourceRange(424, 41));
|
||||
|
||||
Reference in New Issue
Block a user