From 7c1ff07dc9ad447c237d24162c984eb6a961d7c0 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 8 Jul 2018 23:31:40 -0700 Subject: [PATCH] Fix memberHierarchy --- src/messages/ccls_memberHierarchy.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/messages/ccls_memberHierarchy.cc b/src/messages/ccls_memberHierarchy.cc index 0f2132d8..653b773d 100644 --- a/src/messages/ccls_memberHierarchy.cc +++ b/src/messages/ccls_memberHierarchy.cc @@ -3,6 +3,9 @@ #include "query_utils.h" using namespace ccls; +#include +using namespace clang; + #include 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; }