[RISCV] Add shrinkwrap test cases showing gaps in current impl
[llvm-project.git] / clang / test / PCH / late-parsed-instantiations.cpp
blob9ae6b56a09befa925f578c2d4b49ebf65d44d5f1
1 // RUN: %clang_cc1 -fdelayed-template-parsing -std=c++14 -emit-pch %s -o %t.pch -verify
2 // RUN: %clang_cc1 -fdelayed-template-parsing -std=c++14 -include-pch %t.pch %s -verify
4 // RUN: %clang_cc1 -fdelayed-template-parsing -std=c++14 -emit-pch -fpch-instantiate-templates %s -o %t.pch -verify
5 // RUN: %clang_cc1 -fdelayed-template-parsing -std=c++14 -include-pch %t.pch %s -verify
7 // Run this test for i686 as this is the target that modifies default FP options.
8 // RUN: %clang_cc1 -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 -triple i686-pc-linux-gnu -fdelayed-template-parsing -std=c++14 -include-pch %t.pch %s -verify
11 #ifndef HEADER_INCLUDED
13 #define HEADER_INCLUDED
15 // pr33561
16 class ArrayBuffer;
17 template <typename T> class Trans_NS_WTF_RefPtr {
18 public:
19 ArrayBuffer *operator->() { return nullptr; }
21 Trans_NS_WTF_RefPtr<ArrayBuffer> get();
22 template <typename _Visitor>
23 constexpr void visit(_Visitor __visitor) {
24 __visitor(get()); // expected-note {{in instantiation}}
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}}
34 #else
36 // expected-no-diagnostics
38 #endif