[clang] [clang][Python] Apply type annotations to Python (PR #173845)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 12 04:45:31 PST 2026
================
@@ -277,9 +284,9 @@ class SourceLocation(Structure):
"""
_fields_ = [("ptr_data", c_void_p * 2), ("int_data", c_uint)]
- _data = None
+ _data: tuple[File | None, int, int, int] | None = None
- def _get_instantiation(self):
+ def _get_instantiation(self) -> tuple[File | None, int, int, int]:
----------------
Endilll wrote:
I like to see the return type spelled out, but it is complicated enough and is used twice, so I'd like to see it named.
https://github.com/llvm/llvm-project/pull/173845
More information about the cfe-commits
mailing list