blob: 27631e5ba578ac87a4d7c881203e658bafb08c2e [file] [log] [blame]
Reid Kleckner15241ba2016-11-30 00:25:36 +00001// This test uses PrintFunctionNames with -fdelayed-template-parsing because it
2// happens to use a RecursiveASTVisitor that forces deserialization of AST
3// files.
4//
Reid Kleckner6fd35372016-11-30 00:31:16 +00005// 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 \
Reid Kleckner15241ba2016-11-30 00:25:36 +00009// 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
23struct nullopt_t {
24 constexpr explicit nullopt_t(int) {}
25};
26constexpr nullopt_t nullopt(0);
27
28#else
29
30void func() { }
31
32#endif