mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
Add mnemonic constants to ClangSymbolKind
This commit is contained in:
parent
d49679d885
commit
4e6c585e59
@ -77,17 +77,17 @@ using IndexVarId = Id<IndexVar>;
|
||||
|
||||
struct IdCache;
|
||||
|
||||
// TODO Rename query.h:SymbolKind to another name; change int16_t to uint8_t
|
||||
// TODO Rename query.h:SymbolKind to another name
|
||||
// clang/Index/IndexSymbol.h clang::index::SymbolKind
|
||||
enum class ClangSymbolKind : int16_t {
|
||||
enum class ClangSymbolKind : uint8_t {
|
||||
Unknown,
|
||||
|
||||
Module,
|
||||
Module = 1,
|
||||
Namespace,
|
||||
NamespaceAlias,
|
||||
Macro,
|
||||
|
||||
Enum,
|
||||
Enum = 5,
|
||||
Struct,
|
||||
Class,
|
||||
Protocol,
|
||||
@ -95,23 +95,23 @@ enum class ClangSymbolKind : int16_t {
|
||||
Union,
|
||||
TypeAlias,
|
||||
|
||||
Function,
|
||||
Function = 12,
|
||||
Variable,
|
||||
Field,
|
||||
EnumConstant,
|
||||
|
||||
InstanceMethod,
|
||||
InstanceMethod = 16,
|
||||
ClassMethod,
|
||||
StaticMethod,
|
||||
InstanceProperty,
|
||||
ClassProperty,
|
||||
StaticProperty,
|
||||
|
||||
Constructor,
|
||||
Constructor = 22,
|
||||
Destructor,
|
||||
ConversionFunction,
|
||||
|
||||
Parameter,
|
||||
Parameter = 25,
|
||||
Using,
|
||||
};
|
||||
MAKE_REFLECT_TYPE_PROXY(ClangSymbolKind, std::underlying_type<ClangSymbolKind>::type);
|
||||
|
@ -20,10 +20,17 @@ std::string GetBaseName(const std::string& path) {
|
||||
|
||||
} // namespace
|
||||
|
||||
// uint8_t
|
||||
void Reflect(Reader& visitor, uint8_t& value) {
|
||||
value = (uint8_t)visitor.GetInt();
|
||||
}
|
||||
void Reflect(Writer& visitor, uint8_t& value) {
|
||||
visitor.Int(value);
|
||||
}
|
||||
|
||||
// int16_t
|
||||
void Reflect(Reader& visitor, int16_t& value) {
|
||||
if (visitor.IsInt())
|
||||
value = (int16_t)visitor.GetInt();
|
||||
value = (int16_t)visitor.GetInt();
|
||||
}
|
||||
void Reflect(Writer& visitor, int16_t& value) {
|
||||
visitor.Int(value);
|
||||
|
@ -131,6 +131,9 @@ void ReflectMemberEnd(TVisitor& visitor, T& value) {
|
||||
}
|
||||
*/
|
||||
|
||||
// uint8_t
|
||||
void Reflect(Reader& visitor, uint8_t& value);
|
||||
void Reflect(Writer& visitor, uint8_t& value);
|
||||
// int16_t
|
||||
void Reflect(Reader& visitor, int16_t& value);
|
||||
void Reflect(Writer& visitor, int16_t& value);
|
||||
|
Loading…
Reference in New Issue
Block a user