parent
df3da38483
commit
1670805a8d
|
@ -8339,6 +8339,9 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
|
|||
<type-checks>
|
||||
<unusedvar>
|
||||
<suppress>std::insert_iterator</suppress>
|
||||
<suppress>std::lock_guard</suppress>
|
||||
<suppress>std::unique_lock</suppress>
|
||||
<suppress>std::shared_lock</suppress>
|
||||
<check>std::pair</check>
|
||||
</unusedvar>
|
||||
</type-checks>
|
||||
|
|
|
@ -3051,6 +3051,16 @@ private:
|
|||
" std::shared_lock<std::shared_timed_mutex> lock( m );\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
functionVariableUsage("void f() {\n" // #10490
|
||||
" std::shared_lock lock = GetLock();\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
functionVariableUsage("void f() {\n"
|
||||
" auto&& g = std::lock_guard<std::mutex> { mutex };\n"
|
||||
"}\n");
|
||||
TODO_ASSERT_EQUALS("", "[test.cpp:2]: (style) Variable 'g' is assigned a value that is never used.\n", errout.str());
|
||||
}
|
||||
|
||||
void localvar47() { // #6603
|
||||
|
|
Loading…
Reference in New Issue