// Test llvm::Expected data formatters. #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Error.h" #include using namespace llvm; int main() { // Test primitive type (storage is T directly). Expected ExpectedInt = 42; (void)static_cast(ExpectedInt); // Test pointer type (storage is T* directly). int x = 10; Expected ExpectedPtr = &x; (void)static_cast(ExpectedPtr); // Test reference type (storage is std::reference_wrapper). int y = 100; Expected ExpectedRef = y; (void)static_cast(ExpectedRef); // Test templated type (storage is the template type directly). Expected> ExpectedVec = SmallVector{1, 2}; (void)static_cast(ExpectedVec); // Test templated reference type (storage is std::reference_wrapper). SmallVector vec{3, 4}; Expected &> ExpectedVecRef = vec; (void)static_cast(ExpectedVecRef); puts("Break here"); return 0; }