Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Modules / Reachability-func-default-arg.cpp
blob0d6d8655d53293e17524670412724ece6a8f7d42
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: split-file %s %t
4 //
5 // RUN: %clang_cc1 -std=c++20 %t/func_default_arg.cppm -emit-module-interface -o %t/func_default_arg.pcm
6 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only
7 //
8 //--- func_default_arg.cppm
9 export module func_default_arg;
10 struct t {};
11 export t foo(t t1 = t()) {
12 return t1;
15 //--- Use.cpp
16 // expected-no-diagnostics
17 import func_default_arg;
18 void bar() {
19 auto ret = foo();