#ifndef INPUTS_BASIC_H #define INPUTS_BASIC_H #include "memory_stub.h" // Instrumentation for auto_ptr_ref test // @{ struct Base {}; struct Derived : Base {}; std::auto_ptr create_derived_ptr(); // CHECK: std::unique_ptr create_derived_ptr(); // } // Test function return values (declaration) std::auto_ptr f_5(); // CHECK: std::unique_ptr f_5() // Test function parameters void f_6(std::auto_ptr); // CHECK: void f_6(std::unique_ptr); void f_7(const std::auto_ptr &); // CHECK: void f_7(const std::unique_ptr &); // Test on record type fields struct A { std::auto_ptr field; // CHECK: std::unique_ptr field; typedef std::auto_ptr int_ptr_type; // CHECK: typedef std::unique_ptr int_ptr_type; }; // Test template WITH instantiation template struct B { typedef typename std::auto_ptr created_type; // CHECK: typedef typename std::unique_ptr created_type; created_type create() { return std::auto_ptr(new T()); } // CHECK: created_type create() { return std::unique_ptr(new T()); } }; // Test 'using' in a namespace (declaration) namespace ns_1 { // Test multiple using declarations using std::auto_ptr; using std::auto_ptr; // CHECK: using std::unique_ptr; // CHECK-NEXT: using std::unique_ptr; } namespace ns_2 { template struct auto_ptr {}; // CHECK: template struct auto_ptr {}; } #endif // INPUTS_BASIC_H