[clang] [cindex] Add API to query the class methods of a type (PR #123539)
Jannick Kremer via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 25 23:27:22 PST 2025
================
@@ -2052,6 +2052,19 @@ def referenced(self):
return self._referenced
+ @property
+ def specialized(self):
+ """
+ For a cursor that is instantiated from a template, returns a cursor
+ representing the template that it was instantiated from.
+ """
+ if not hasattr(self, "_specialized"):
+ self._specialized = Cursor.from_result(
+ conf.lib.clang_getSpecializedCursorTemplate(self), self
+ )
+
+ return self._specialized
+
----------------
DeinAlptraum wrote:
This change seems unrelated to the rest of this PR, and should be in a separate one. It is also missing tests.
https://github.com/llvm/llvm-project/pull/123539
More information about the cfe-commits
mailing list