| 25 | |
| 26 | // clang 3.6 uses unique_ptr in many places that was not using it before |
| 27 | template<typename T> struct MaybeUnique { |
| 28 | T *val; |
| 29 | operator T*() { return val; } |
| 30 | template <typename X> operator std::unique_ptr<X> () && { return std::unique_ptr<X>(val); } |
| 31 | }; |
| 32 | template<typename T> MaybeUnique<T> maybe_unique(T* val) { return {val}; } |
| 33 | |
| 34 | #ifndef LLVM_FALLTHROUGH |
nothing calls this directly
no outgoing calls
no test coverage detected