================
@@ -642,51 +1259,29 @@ def register(value, name):
 
 
 ### Cursor Kinds ###
-class BaseEnumeration(object):
-    """
-    Common base class for named enumerations held in sync with Index.h values.
+TEnum = TypeVar("TEnum", bound="BaseEnumeration")
 
-    Subclasses must define their own _kinds and _name_map members, as:
-    _kinds = []
-    _name_map = None
-    These values hold the per-subclass instances and value-to-name mappings,
-    respectively.
 
+class BaseEnumeration(Enum):
----------------
DeinAlptraum wrote:

Since I've collected the shared functionality of all enums into this class, 
including e.g. `__repr__` definitions, some of them may differ slightly in 
output.
E.g. the representation of a `TemplateArgumentKind.INTEGRAL` is exactly 
`TemplateArgumentKind.INTEGRAL`, compared to 
`'clang.cindex.TemplateArgumentKind'>.INTEGRAL`, which is consistent with the 
representation of most other enums.

https://github.com/llvm/llvm-project/pull/78114
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to