Skip to content

Commit

Permalink
Add support for std::complex (refs #11313) (#6807)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Sep 16, 2024
1 parent f4f4ce8 commit de806a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions cfg/std.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8978,6 +8978,7 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
<checkFiniteLifetime>std::unique_lock</checkFiniteLifetime>
<checkFiniteLifetime>std::shared_lock</checkFiniteLifetime>
<check>std::pair</check>
<check>std::complex</check>
<check>std::exception</check>
<check>std::logic_error</check>
<check>std::domain_error</check>
Expand Down
8 changes: 8 additions & 0 deletions test/cfg/std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5153,6 +5153,14 @@ void unusedvar_stringstream(const char* p)
std::stringstream sstr(p);
}

void unusedvar_stdcomplex()
{
// cppcheck-suppress unusedVariable
std::complex<double> z1;
// cppcheck-suppress unreadVariable
std::complex<double> z2(0.0, 0.0);
}

int passedByValue_std_array1(std::array<int, 2> a)
{
return a[0] + a[1];
Expand Down

0 comments on commit de806a1

Please sign in to comment.