Commit 451123be authored by Marco Bubke's avatar Marco Bubke
Browse files

Clang: Clean up keyword highlighting



Change-Id: I8c2737718282d047e487b8ed82a40dc256d39ce5
Reviewed-by: Ivan Donchevskii's avatarIvan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent e6bf3990
......@@ -393,20 +393,19 @@ static HighlightingType highlightingTypeForKeyword(CXTranslationUnit cxTranslati
}
const ClangString spelling = clang_getTokenSpelling(cxTranslationUnit, *cxToken);
const char *c = spelling.cString();
if (std::strcmp(c, "bool") == 0
|| std::strcmp(c, "char") == 0
|| std::strcmp(c, "char16_t") == 0
|| std::strcmp(c, "char32_t") == 0
|| std::strcmp(c, "double") == 0
|| std::strcmp(c, "float") == 0
|| std::strcmp(c, "int") == 0
|| std::strcmp(c, "long") == 0
|| std::strcmp(c, "short") == 0
|| std::strcmp(c, "signed") == 0
|| std::strcmp(c, "unsigned") == 0
|| std::strcmp(c, "void") == 0
|| std::strcmp(c, "wchar_t") == 0) {
if (spelling == "bool"
|| spelling == "char"
|| spelling == "char16_t"
|| spelling == "char32_t"
|| spelling == "double"
|| spelling == "float"
|| spelling == "int"
|| spelling == "long"
|| spelling == "short"
|| spelling == "signed"
|| spelling == "unsigned"
|| spelling == "void"
|| spelling == "wchar_t") {
return HighlightingType::PrimitiveType;
}
......
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