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" #include "query_utils.h"
using namespace ccls; using namespace ccls;
#include <clang/AST/Type.h>
using namespace clang;
#include <unordered_set> #include <unordered_set>
namespace { namespace {
@ -121,7 +124,7 @@ bool Expand(MessageHandler* m,
Out_CclsMemberHierarchy::Entry* entry, Out_CclsMemberHierarchy::Entry* entry,
bool qualified, bool qualified,
int levels) { 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)); entry->name = ClangBuiltinTypeName(CXTypeKind(entry->usr));
return true; return true;
} }