forked from qt-creator/qt-creator
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:
@@ -374,12 +374,16 @@ HighlightingType operatorKind(const Cursor &cursor)
|
|||||||
|
|
||||||
HighlightingType HighlightingMark::punctuationKind(const Cursor &cursor)
|
HighlightingType HighlightingMark::punctuationKind(const Cursor &cursor)
|
||||||
{
|
{
|
||||||
|
HighlightingType highlightingType = HighlightingType::Invalid;
|
||||||
|
|
||||||
switch (cursor.kind()) {
|
switch (cursor.kind()) {
|
||||||
case CXCursor_DeclRefExpr: return operatorKind(cursor);
|
case CXCursor_DeclRefExpr: highlightingType = operatorKind(cursor); break;
|
||||||
case CXCursor_Constructor:
|
case CXCursor_Constructor:
|
||||||
case CXCursor_CallExpr: collectOutputArguments(cursor);
|
case CXCursor_CallExpr: collectOutputArguments(cursor); break;
|
||||||
default: return HighlightingType::Invalid;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return highlightingType;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HighlightingType highlightingTypeForKeyword(CXTranslationUnit cxTranslationUnit,
|
static HighlightingType highlightingTypeForKeyword(CXTranslationUnit cxTranslationUnit,
|
||||||
|
|||||||
Reference in New Issue
Block a user