[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / PCH / cxx14-decltype-auto.cpp
blobd5f83c2543fb8329bf8758e5b6b850108d08352a
1 // Test with pch.
2 // RUN: %clang_cc1 -emit-pch -std=c++14 -o %t %s
3 // RUN: %clang_cc1 -include-pch %t -emit-llvm -std=c++14 -o - %s
5 #ifndef HEADER
6 #define HEADER
8 template <typename T>
9 constexpr decltype(auto) test(T) { return T(); }
10 class A {};
11 void k() { test(A()); }
13 #else
15 auto s = test(A());
16 #endif