Fix 11062: false positive: knownEmptyContainer (regression) (#4106)

* Fix 11062: false positive: knownEmptyContainer (regression)

* Format
This commit is contained in:
Paul Fultz II 2022-05-11 23:24:16 -05:00 committed by GitHub
parent 5d8da2b83c
commit 6d3208ecb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -7765,7 +7765,6 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
<use-retval/>
<arg nr="1">
<not-uninit/>
<iterator container="1" type="first"/>
</arg>
</function>
<!-- template< class ForwardIt, class T > bool binary_search( ForwardIt first, ForwardIt last, const T& value ); (until C++20) -->

View File

@ -5780,6 +5780,15 @@ private:
"}\n",
true);
ASSERT_EQUALS("", errout.str());
check("extern void f(std::string&&);\n"
"static void func() {\n"
" std::string s;\n"
" const std::string& s_ref = s;\n"
" f(std::move(s));\n"
"}\n",
true);
ASSERT_EQUALS("", errout.str());
}
void checkMutexes() {