1 // RUN: %clang_cc1 -std=c++14 -verify %s
5 template <typename T
> class Trans_NS_WTF_RefPtr
{
7 ArrayBuffer
*operator->() { return nullptr; }
9 Trans_NS_WTF_RefPtr
<ArrayBuffer
> get();
10 template <typename _Visitor
>
11 constexpr void visit(_Visitor __visitor
) {
12 __visitor(get()); // expected-note {{in instantiation}}
16 visit([](auto buffer
) -> char { // expected-note {{in instantiation}}
18 }); // expected-warning {{non-void lambda does not return a value}}
19 } // expected-warning {{non-void function does not return a value}}
23 template <typename Promise
> struct coroutine_handle
{
24 Promise
&promise() const { return
25 *static_cast<Promise
*>(nullptr); // expected-warning {{binding dereferenced null}}
29 template <typename Promise
> auto GetCurrenPromise() {
30 struct Awaiter
{ // expected-note {{in instantiation}}
31 void await_suspend(coroutine_handle
<Promise
> h
) {
32 h
.promise(); // expected-note {{in instantiation}}
39 auto &&p
= GetCurrenPromise
<int>(); // expected-note {{in instantiation}}