================ @@ -2454,7 +2480,7 @@ def element_type(self): If accessed on a type that is not an array, complex, or vector type, an exception will be raised. """ - result = conf.lib.clang_getElementType(self) + result = Type.from_result(conf.lib.clang_getElementType(self), (self,)) ---------------- Endilll wrote:
I took another look at this particular thing, even though it's out scope of this PR. Apparently, the sole purpose of this dance is to make sure that `TranslationUnit` doesn't die before `Type` or `Cursor`. I have a feeling we can do better (read "less confusing"), but I don't have a concrete proposal yet. https://github.com/llvm/llvm-project/pull/105490 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits