Commit f22bd9dc authored by Marco Bubke's avatar Marco Bubke
Browse files

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: default avatarThiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Donchevskii's avatarIvan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent 451123be
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment