1 | // This test uses PrintFunctionNames with -fdelayed-template-parsing because it |
2 | // happens to use a RecursiveASTVisitor that forces deserialization of AST |
3 | // files. |
4 | // |
5 | // RUN: %clang_cc1 -triple %itanium_abi_triple -fdelayed-template-parsing \ |
6 | // RUN: -std=c++14 -emit-pch -o %t.pch %s |
7 | // RUN: %clang_cc1 -triple %itanium_abi_triple \ |
8 | // RUN: -load %llvmshlibdir/PrintFunctionNames%pluginext \ |
9 | // RUN: -add-plugin print-fns -std=c++14 -include-pch %t.pch %s -emit-llvm \ |
10 | // RUN: -fdelayed-template-parsing -debug-info-kind=limited \ |
11 | // RUN: -o %t.ll 2>&1 | FileCheck --check-prefix=DECLS %s |
12 | // RUN: FileCheck --check-prefix=IR %s < %t.ll |
13 | // |
14 | // REQUIRES: plugins, examples |
15 | |
16 | // DECLS: top-level-decl: "func" |
17 | |
18 | // IR: define {{.*}}void @_Z4funcv() |
19 | |
20 | #ifndef HEADER |
21 | #define HEADER |
22 | |
23 | struct nullopt_t { |
24 | constexpr explicit nullopt_t(int) {} |
25 | }; |
26 | constexpr nullopt_t nullopt(0); |
27 | |
28 | #else |
29 | |
30 | void func() { } |
31 | |
32 | #endif |
33 | |