aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/merge-deduced-return.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/merge-deduced-return.cpp')
-rw-r--r--test/Modules/merge-deduced-return.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Modules/merge-deduced-return.cpp b/test/Modules/merge-deduced-return.cpp
index 0a4de7b97554..71dc29b633b6 100644
--- a/test/Modules/merge-deduced-return.cpp
+++ b/test/Modules/merge-deduced-return.cpp
@@ -8,6 +8,8 @@ module A {}
#pragma clang module begin A
inline auto f() { struct X {}; return X(); }
inline auto a = f();
+auto g(int);
+template<typename T> auto h(T t) { return g(t); }
#pragma clang module end
#pragma clang module endbuild
@@ -17,12 +19,14 @@ module B {}
#pragma clang module begin B
inline auto f() { struct X {}; return X(); }
inline auto b = f();
+auto g(int) { return 0; }
#pragma clang module end
#pragma clang module endbuild
#ifdef LOCAL
inline auto f() { struct X {}; return X(); }
inline auto b = f();
+auto g(int) { return 0; }
#else
#pragma clang module import B
#endif
@@ -31,3 +35,5 @@ inline auto b = f();
using T = decltype(a);
using T = decltype(b);
+
+int test_g = h(0);