Skip to content

Commit

Permalink
Update std.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github authored Jun 20, 2024
1 parent da623c4 commit c83cfe1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/cfg/std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5085,4 +5085,14 @@ void constParameterReference_assign(std::vector<int>& v, int& r) {
void constParameterReference_insert(std::list<int>& l, int& r) {
l.insert(l.end(), r);
l.insert(l.end(), 5, r);
}
}

const char* variableScope_cstr_dummy(const char* q); // #12812
std::size_t variableScope_cstr(const char* p) {
std::string s;
if (!p) {
s = "abc";
p = variableScope_cstr_dummy(s.c_str());
}
return std::strlen(p);
}

0 comments on commit c83cfe1

Please sign in to comment.