Clang: Fix warning in HighlightingMark::punctuationKind

Actually mixing returns and not is not that well readable workflow. A other
option would be to use if.

Change-Id: I36f07adb77d50ddc6890b6292c7883a1b5f80f58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Marco Bubke
2017-06-13 17:24:35 +02:00
parent 451123beea
commit f22bd9dc4c

View File

@@ -374,12 +374,16 @@ HighlightingType operatorKind(const Cursor &cursor)
HighlightingType HighlightingMark::punctuationKind(const Cursor &cursor)
{
HighlightingType highlightingType = HighlightingType::Invalid;
switch (cursor.kind()) {
case CXCursor_DeclRefExpr: return operatorKind(cursor);
case CXCursor_DeclRefExpr: highlightingType = operatorKind(cursor); break;
case CXCursor_Constructor:
case CXCursor_CallExpr: collectOutputArguments(cursor);
default: return HighlightingType::Invalid;
case CXCursor_CallExpr: collectOutputArguments(cursor); break;
default: break;
}
return highlightingType;
}
static HighlightingType highlightingTypeForKeyword(CXTranslationUnit cxTranslationUnit,