| 758 | } |
| 759 | |
| 760 | expr Pointer::isStackAllocated(bool simplify) const { |
| 761 | // 1) if a stack object is returned by a callee it's UB |
| 762 | // 2) if a stack object is given as argument by the caller, we can upgrade it |
| 763 | // to a global object, so we can do POR here. |
| 764 | if (simplify && (!has_alloca || isLocal().isFalse())) |
| 765 | return false; |
| 766 | return getAllocType() == STACK; |
| 767 | } |
| 768 | |
| 769 | expr Pointer::isHeapAllocated() const { |
| 770 | assert(MALLOC == 2 && CXX_NEW == 3); |
no test coverage detected