mirror of
https://github.com/github/codeql.git
synced 2026-08-04 09:23:23 +02:00
21 lines
198 B
C++
21 lines
198 B
C++
struct Point2 {
|
|
int x;
|
|
int y;
|
|
};
|
|
|
|
struct Point3 : Point2 {
|
|
int z;
|
|
};
|
|
|
|
void f() {
|
|
Point2 p2;
|
|
Point3 p3;
|
|
p2 = p3; // $ Alert
|
|
}
|
|
|
|
void g() {
|
|
Point2* p2 = 0;
|
|
Point3* p3 = 0;
|
|
p2 = p3;
|
|
}
|