// RUN: %clang_cc1 -std=c++2a -verify %s
// expected-no-diagnostics
template<typename T>
concept C =(f(T()),true);template<typename T>constexprboolfoo(){returnfalse;}template<typename T>requires(f(T()),true)constexprboolfoo()requires(f(T()),true){returntrue;}namespacea{structA{};constexprvoidf(A a){}}static_assert(C<a::A>);static_assert(foo<a::A>());namespacea{// This makes calls to f ambiguous, but the second check will still succeed
// because the constraint satisfaction results are cached.
constexprvoidf(A a,int=2){}}static_assert(C<a::A>);static_assert(foo<a::A>());