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
dfde6d07
Unverified
Commit
dfde6d07
authored
Jun 09, 2023
by
Umang Yadav
Committed by
GitHub
Jun 09, 2023
Browse files
Fix compile warnings for shadowing variable names (#1825)
parent
26aabd2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
src/include/migraphx/matcher.hpp
src/include/migraphx/matcher.hpp
+9
-9
No files found.
src/include/migraphx/matcher.hpp
View file @
dfde6d07
...
@@ -135,14 +135,14 @@ template <class M>
...
@@ -135,14 +135,14 @@ template <class M>
auto
bind_match
(
M
m
,
std
::
string
name
)
auto
bind_match
(
M
m
,
std
::
string
name
)
{
{
return
make_function_matcher
(
return
make_function_matcher
(
[
=
,
name
=
std
::
move
(
name
)](
matcher_context
&
ctx
,
[
=
,
m_
name
=
std
::
move
(
name
)](
matcher_context
&
ctx
,
instruction_ref
ins
)
->
optional
<
instruction_ref
>
{
instruction_ref
ins
)
->
optional
<
instruction_ref
>
{
auto
result
=
m
.
match
(
ctx
,
ins
);
auto
result
=
m
.
match
(
ctx
,
ins
);
if
(
result
)
if
(
result
)
{
{
if
(
not
ctx
.
has_instruction
(
ins
))
if
(
not
ctx
.
has_instruction
(
ins
))
return
nullopt
;
return
nullopt
;
ctx
.
instructions
[
name
]
=
ins
;
ctx
.
instructions
[
m_
name
]
=
ins
;
}
}
return
result
;
return
result
;
});
});
...
@@ -655,9 +655,9 @@ auto skip_output(Ms... ms)
...
@@ -655,9 +655,9 @@ auto skip_output(Ms... ms)
inline
auto
var
(
std
::
string
s
)
inline
auto
var
(
std
::
string
s
)
{
{
return
make_basic_fun_matcher
(
return
make_basic_fun_matcher
(
[
=
,
s
=
std
::
move
(
s
)](
const
matcher_context
&
ctx
,
[
=
,
m_
s
=
std
::
move
(
s
)](
const
matcher_context
&
ctx
,
instruction_ref
)
->
optional
<
instruction_ref
>
{
instruction_ref
)
->
optional
<
instruction_ref
>
{
auto
it
=
ctx
.
instructions
.
find
(
s
);
auto
it
=
ctx
.
instructions
.
find
(
m_
s
);
if
(
it
==
ctx
.
instructions
.
end
())
if
(
it
==
ctx
.
instructions
.
end
())
return
nullopt
;
return
nullopt
;
return
it
->
second
;
return
it
->
second
;
...
@@ -667,7 +667,7 @@ inline auto var(std::string s)
...
@@ -667,7 +667,7 @@ inline auto var(std::string s)
inline
auto
name
(
std
::
string
s
)
inline
auto
name
(
std
::
string
s
)
{
{
return
make_basic_pred_matcher
(
return
make_basic_pred_matcher
(
[
=
,
s
=
std
::
move
(
s
)](
instruction_ref
ins
)
{
return
ins
->
name
()
==
s
;
});
[
=
,
m_
s
=
std
::
move
(
s
)](
instruction_ref
ins
)
{
return
ins
->
name
()
==
m_
s
;
});
}
}
inline
auto
name_contains
(
const
std
::
string
&
name
)
inline
auto
name_contains
(
const
std
::
string
&
name
)
...
@@ -678,8 +678,8 @@ inline auto name_contains(const std::string& name)
...
@@ -678,8 +678,8 @@ inline auto name_contains(const std::string& name)
inline
auto
name
(
std
::
unordered_set
<
std
::
string
>
names
)
inline
auto
name
(
std
::
unordered_set
<
std
::
string
>
names
)
{
{
return
make_basic_pred_matcher
([
=
,
names
=
std
::
move
(
names
)](
instruction_ref
ins
)
{
return
make_basic_pred_matcher
([
=
,
m_
names
=
std
::
move
(
names
)](
instruction_ref
ins
)
{
return
names
.
count
(
ins
->
name
())
>
0
;
return
m_
names
.
count
(
ins
->
name
())
>
0
;
});
});
}
}
...
...
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