33 lines · cpp
1// This test uses PrintFunctionNames with -fdelayed-template-parsing because it2// happens to use a RecursiveASTVisitor that forces deserialization of AST3// files.4//5// RUN: %clang_cc1 -triple %itanium_abi_triple -fdelayed-template-parsing \6// RUN: -std=c++14 -emit-pch -o %t.pch %s7// 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 %s12// RUN: FileCheck --check-prefix=IR %s < %t.ll13//14// REQUIRES: plugins, examples15 16// DECLS: top-level-decl: "func"17 18// IR: define {{.*}}void @_Z4funcv()19 20#ifndef HEADER21#define HEADER22 23struct nullopt_t {24 constexpr explicit nullopt_t(int) {}25};26constexpr nullopt_t nullopt(0);27 28#else29 30void func() { }31 32#endif33