Files
codeql/cpp/ql/test/library-tests/unions/unions.cpp
2018-09-23 16:23:52 -07:00

24 lines
197 B
C++

enum Type { S, I };
struct Entry {
char* name;
Type t;
char* s;
int i;
};
union Value {
char* s;
int i;
};
struct EntryWithMethod: Entry {
int getAsInt() {
return i;
}
};