Fix memberHierarchy

This commit is contained in:
Fangrui Song 2018-07-08 23:31:40 -07:00
parent d816e1b918
commit 548f44dd79

View File

@ -3,6 +3,9 @@
#include "query_utils.h"
using namespace ccls;
#include <clang/AST/Type.h>
using namespace clang;
#include <unordered_set>
namespace {
@ -121,7 +124,7 @@ bool Expand(MessageHandler* m,
Out_CclsMemberHierarchy::Entry* entry,
bool qualified,
int levels) {
if (CXType_FirstBuiltin <= entry->usr && entry->usr <= CXType_LastBuiltin) {
if (0 < entry->usr && entry->usr <= BuiltinType::LastKind) {
entry->name = ClangBuiltinTypeName(CXTypeKind(entry->usr));
return true;
}