C++: Add BuiltInIntAddr class for __INTADDR__

This commit is contained in:
Jonas Jensen 2019-01-03 13:33:37 +01:00
Родитель 6b27dcabc5
Коммит 8f9849b30b
2 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -42,12 +42,19 @@ class BuiltInNoOp extends BuiltInOperation, @noopexpr {
}
/**
* A C++ `__offsetof` expression (used by some implementations of offsetof in the presence of user-defined `operator&`).
* A C++ `__offsetof` expression (used by some implementations of offsetof in the presence of user-defined `operator&`).
*/
class BuiltInOperationOffsetOf extends BuiltInOperation, @offsetofexpr {
override string toString() { result = "__offsetof" }
}
/**
* A C/C++ `__INTADDR__` expression, used by EDG to implement `offsetof` in the presence of user-defined `operator&`.
*/
class BuiltInIntAddr extends BuiltInOperation, @intaddrexpr {
override string toString() { result = "__INTADDR__" }
}
/**
* A C++ `__has_assign` expression (used by some implementations of the type_traits header).
*/

Просмотреть файл

@ -8,6 +8,7 @@
| edg.c:13:14:13:45 | (...) | 0 | 0 |
| edg.c:13:14:13:45 | (mystruct *)... | 0 | 0 |
| edg.c:13:14:13:45 | (size_t)... | 0 | 0 |
| edg.c:13:14:13:45 | __INTADDR__ | 1 | 1 |
| edg.c:13:43:13:44 | f2 | 0 | 0 |
| file://:0:0:0:0 | 0 | 0 | 0 |
| file://:0:0:0:0 | * ... | 0 | 0 |