Clang: Fix highlighting of primitive types

libClang categorizes these as keywords, so we need to check
if a keyword is actually a primitive type, and use that.

Task-number: QTCREATORBUG-17867
Change-Id: I354bb0422505ed7732a0799d9c86d3acfdeb0785
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Eike Ziller
2017-05-17 16:40:21 +02:00
parent f51fbd68e1
commit db11c01df8
5 changed files with 34 additions and 6 deletions

View File

@@ -44,6 +44,8 @@ TextEditor::TextStyle toTextStyle(ClangBackEnd::HighlightingType type)
return TextEditor::C_VIRTUAL_METHOD;
case HighlightingType::Type:
return TextEditor::C_TYPE;
case HighlightingType::PrimitiveType:
return TextEditor::C_PRIMITIVE_TYPE;
case HighlightingType::LocalVariable:
return TextEditor::C_LOCAL;
case HighlightingType::Field: