mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C++: Add test from issue #5190.
This commit is contained in:
@@ -65,4 +65,14 @@ void test_shared_field_member() {
|
||||
std::unique_ptr<A> p = std::make_unique<A>(source(), 0);
|
||||
sink(p->x); // $ MISSING: ast,ir
|
||||
sink(p->y); // not tainted
|
||||
}
|
||||
|
||||
void getNumber(std::shared_ptr<int> ptr) {
|
||||
*ptr = source();
|
||||
}
|
||||
|
||||
int test_from_issue_5190() {
|
||||
std::shared_ptr<int> p(new int);
|
||||
getNumber(p);
|
||||
sink(*p); // $ MISSING: ast,ir
|
||||
}
|
||||
@@ -348,7 +348,7 @@ namespace std {
|
||||
class shared_ptr {
|
||||
public:
|
||||
shared_ptr() noexcept;
|
||||
explicit shared_ptr(T*);
|
||||
explicit shared_ptr(T*); shared_ptr(const shared_ptr&) noexcept;
|
||||
template<class U> shared_ptr(const shared_ptr<U>&) noexcept;
|
||||
template<class U> shared_ptr(shared_ptr<U>&&) noexcept;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user