//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // unique_ptr // test op->() #include #include struct V { int member; }; int main(int, char**) { std::unique_ptr p; std::unique_ptr const& cp = p; p->member; // expected-error {{member reference type 'std::unique_ptr' is not a pointer}} // expected-error@-1 {{no member named 'member'}} cp->member; // expected-error {{member reference type 'const std::unique_ptr' is not a pointer}} // expected-error@-1 {{no member named 'member'}} return 0; }