summaryrefslogtreecommitdiffstats
path: root/tools/clang-tidy/test/readability-redundant-smartptr-get.cpp
blob: 66eb8d6c37da67bc9a1ec2febe91cbb6132930ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#define NULL __null

namespace std {

template <typename T>
struct unique_ptr {
  T& operator*() const;
  T* operator->() const;
  T* get() const;
  explicit operator bool() const noexcept;
};
}

struct A {
};

void foo() {
  A& b2 = *std::unique_ptr<A>().get();
}