================
@@ -3968,7 +4500,7 @@ def function_exists(self, name):
         return True
 
 
-def register_enumerations():
+def register_enumerations() -> None:
----------------
DeinAlptraum wrote:

This implementation dynamically adds the TokenKind variants, which means it 
also suffers from the same problems as the previoius "manual" implementation of 
enums: if you write e.g. `TokenKind.PUNCTUATION` in a program and typecheck it, 
it will throw an error since it doesn't recognize `PUNCTUATION` as a member of 
`TokenKind`.
I'm not sure why this one enum is outsourced to a different file and 
implemented via this dynamic registering approach. I'd be in favor of removing 
that and handling it just like the 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