Skip to content

Commit 7ffa703

Browse files
committed
Fix #14976 FP uninitvar (std::size() used on array)
1 parent dfcec18 commit 7ffa703

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

cfg/std.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8343,9 +8343,7 @@ initializer list (7) string& replace (const_iterator i1, const_iterator i2, init
83438343
<leak-ignore/>
83448344
<container yields="size"/>
83458345
<returnValue type="size_t"/>
8346-
<arg nr="1" direction="in">
8347-
<not-uninit/>
8348-
</arg>
8346+
<arg nr="1" direction="in" indirect="0"/>
83498347
</function>
83508348
<function name="std::ssize">
83518349
<noreturn>false</noreturn>

test/cfg/std.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5071,6 +5071,11 @@ int f_constVariable_std_begin() {
50715071
return arr[0];
50725072
}
50735073

5074+
std::size_t uninitvar_std_size() { // #14976
5075+
int a[3];
5076+
return std::size(a);
5077+
}
5078+
50745079
void smartPtr_get()
50755080
{
50765081
std::unique_ptr<int> p;

0 commit comments

Comments
 (0)