mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Python: Update type-tracking snippet
based on what I learned in https://github.com/github/codeql/pull/5184
This commit is contained in:
8
python/.vscode/ql.code-snippets
vendored
8
python/.vscode/ql.code-snippets
vendored
@@ -105,8 +105,8 @@
|
||||
"scope": "ql",
|
||||
"prefix": "type tracking",
|
||||
"body": [
|
||||
"/** Gets a reference to a ${3:thing}. */",
|
||||
"private DataFlow::Node ${1:myType}(DataFlow::TypeTracker t) {",
|
||||
"/** Gets a reference to ${3:a thing}. */",
|
||||
"private DataFlow::LocalSourceNode ${1:myType}(DataFlow::TypeTracker t) {",
|
||||
" t.start() and",
|
||||
" result = ${2:value}",
|
||||
" or",
|
||||
@@ -115,9 +115,9 @@
|
||||
" )",
|
||||
"}",
|
||||
"",
|
||||
"/** Gets a reference to a ${3:thing}. */",
|
||||
"/** Gets a reference to $3. */",
|
||||
"DataFlow::Node $1() {",
|
||||
" result = $1(DataFlow::TypeTracker::end())",
|
||||
" $1(DataFlow::TypeTracker::end()).flowsTo(result)",
|
||||
"}"
|
||||
],
|
||||
"description": "Type tracking predicate",
|
||||
|
||||
Reference in New Issue
Block a user