mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 07:46:05 +00:00
18 lines
370 B
C++
18 lines
370 B
C++
// RUN: %clang_cc1 -std=c++20 -include %s %s -o %t
|
|
|
|
// RUN: %clang_cc1 -std=c++20 -emit-pch %s -o %t
|
|
// RUN: %clang_cc1 -std=c++20 -include-pch %t -verify %s
|
|
|
|
// expected-no-diagnostics
|
|
|
|
#ifndef HEADER
|
|
#define HEADER
|
|
|
|
template<typename T> auto f() -> decltype([]{ return T(42); });
|
|
|
|
#else /*included pch*/
|
|
|
|
static_assert(decltype(f<int>())()() == 42);
|
|
|
|
#endif // HEADER
|