File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ performance-*,
26
26
readability-const-return-type,
27
27
readability-redundant-declaration,
28
28
readability-redundant-string-init,
29
+ clang-analyzer-core.StackAddressEscape,
29
30
'
30
31
HeaderFilterRegex : ' .'
31
32
WarningsAsErrors : ' *'
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ struct StructField
92
92
template <typename LocalType, typename EmplaceFn>
93
93
struct ReadDestEmplace
94
94
{
95
- ReadDestEmplace (TypeList<LocalType>, EmplaceFn&& emplace_fn) : m_emplace_fn(emplace_fn) {}
95
+ ReadDestEmplace (TypeList<LocalType>, EmplaceFn emplace_fn) : m_emplace_fn(std::move( emplace_fn) ) {}
96
96
97
97
// ! Simple case. If ReadField impementation calls this construct() method
98
98
// ! with constructor arguments, just pass them on to the emplace function.
@@ -123,15 +123,15 @@ struct ReadDestEmplace
123
123
return temp;
124
124
}
125
125
}
126
- EmplaceFn& m_emplace_fn;
126
+ EmplaceFn m_emplace_fn;
127
127
};
128
128
129
129
// ! Helper function to create a ReadDestEmplace object that constructs a
130
130
// ! temporary, ReadField can return.
131
131
template <typename LocalType>
132
132
auto ReadDestTemp ()
133
133
{
134
- return ReadDestEmplace{TypeList<LocalType>(), [& ](auto &&... args) -> decltype (auto ) {
134
+ return ReadDestEmplace{TypeList<LocalType>(), [](auto &&... args) -> decltype (auto ) {
135
135
return LocalType{std::forward<decltype (args)>(args)...};
136
136
}};
137
137
}
You can’t perform that action at this time.
0 commit comments