We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d8aa82 commit 68bdd51Copy full SHA for 68bdd51
swift/ql/lib/codeql/swift/elements/AstNode.qll
@@ -57,6 +57,9 @@ class AstNode extends Generated::AstNode {
57
58
/**
59
* Gets the nearest declaration that contains this AST node, if any.
60
+ *
61
+ * Note that the nearest declaration may be an extension of a type declaration. If you always
62
+ * want the type declaration and not the extension, use `getEnclosingDecl().asNominalTypeDecl()`.
63
*/
64
final Decl getEnclosingDecl() { result = Cached::getEnclosingDecl(this) }
65
0 commit comments