Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
25e722d8
Commit
25e722d8
authored
Nov 30, 2023
by
Paul
Browse files
Format
parent
487447a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
tools/cppcheck/migraphx.py
tools/cppcheck/migraphx.py
+7
-1
No files found.
tools/cppcheck/migraphx.py
View file @
25e722d8
...
...
@@ -37,6 +37,7 @@ def getVariableDecl(var):
end
=
end
.
next
return
var
.
typeStartToken
.
forward
(
end
)
def
isFunctionCall
(
token
):
if
not
token
:
return
False
...
...
@@ -361,7 +362,12 @@ def UseDeviceLaunch(cfg, data):
@
cppcheck
.
checker
def
UseManagePointer
(
cfg
,
data
):
functions
=
{
"fclose"
,
"free"
,
"hipFree"
,
"hipHostFree"
,
"hipFreeArray"
,
"hipMemFree"
,
"hipStreamDestroy"
,
"hipEventDestroy"
,
"hipArrayDestroy"
,
"hipCtxDestroy"
,
"hipDestroyTextureObject"
,
"hipDestroySurfaceObject"
,
"miirDestroyHandle"
}
functions
=
{
"fclose"
,
"free"
,
"hipFree"
,
"hipHostFree"
,
"hipFreeArray"
,
"hipMemFree"
,
"hipStreamDestroy"
,
"hipEventDestroy"
,
"hipArrayDestroy"
,
"hipCtxDestroy"
,
"hipDestroyTextureObject"
,
"hipDestroySurfaceObject"
,
"miirDestroyHandle"
}
for
token
in
cfg
.
tokenlist
:
if
not
isFunctionCall
(
token
):
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment