| 1 |
// RUN: %clang_cc1 -Wno-error=return-type -fdelayed-template-parsing -std=c++14 -emit-pch %s -o %t.pch -verify |
| 2 |
// RUN: %clang_cc1 -Wno-error=return-type -fdelayed-template-parsing -std=c++14 -include-pch %t.pch %s -verify |
| 3 |
|
| 4 |
// RUN: %clang_cc1 -Wno-error=return-type -fdelayed-template-parsing -std=c++14 -emit-pch -fpch-instantiate-templates %s -o %t.pch -verify |
| 5 |
// RUN: %clang_cc1 -Wno-error=return-type -fdelayed-template-parsing -std=c++14 -include-pch %t.pch %s -verify |
| 6 |
|
| 7 |
// Run this test for i686 as this is the target that modifies default FP options. |
| 8 |
// RUN: %clang_cc1 -Wno-error=return-type -triple i686-pc-linux-gnu -fdelayed-template-parsing -std=c++14 -emit-pch -fpch-instantiate-templates %s -o %t.pch -verify |
| 9 |
// RUN: %clang_cc1 -Wno-error=return-type -triple i686-pc-linux-gnu -fdelayed-template-parsing -std=c++14 -include-pch %t.pch %s -verify |
| 10 |
|
| 11 |
#ifndef HEADER_INCLUDED |
| 12 |
|
| 13 |
#define HEADER_INCLUDED |
| 14 |
|
| 15 |
// pr33561 |
| 16 |
class ArrayBuffer; |
| 17 |
template <typename T> class Trans_NS_WTF_RefPtr { |
| 18 |
public: |
| 19 |
ArrayBuffer *operator->() { return nullptr; } |
| 20 |
}; |
| 21 |
Trans_NS_WTF_RefPtr<ArrayBuffer> get(); |
| 22 |
template <typename _Visitor> |
| 23 |
constexpr void visit(_Visitor __visitor) { |
| 24 |
__visitor(get()); // expected-note {{in instantiation}} |
| 25 |
} |
| 26 |
class ArrayBuffer { |
| 27 |
char data() { |
| 28 |
visit([](auto buffer) -> char { // expected-note {{in instantiation}} |
| 29 |
buffer->data(); |
| 30 |
}); // expected-warning {{non-void lambda does not return a value}} |
| 31 |
} // expected-warning {{non-void function does not return a value}} |
| 32 |
}; |
| 33 |
|
| 34 |
#else |
| 35 |
|
| 36 |
// expected-no-diagnostics |
| 37 |
|
| 38 |
#endif |