summaryrefslogtreecommitdiffstats
path: root/clang/test/PCH/cxx2a-requires-expr.cpp
blob: 5548db4ccf924a035cefd8cb262ba2b1130c843e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_cc1 -emit-pch -std=c++2a -o %t %s
// RUN: %clang_cc1 -std=c++2a -x ast -ast-print %t | FileCheck %s

template<typename T>
concept C = true;

template<typename T, typename U>
concept C2 = true;

template<typename T>
bool f() {
  // CHECK: requires (T t) { t++; { t++ } noexcept -> C; { t++ } -> C2<int>; typename T::a; requires T::val; };
  return requires (T t) {
    t++;
    { t++ } noexcept -> C;
    { t++ } -> C2<int>;
    typename T::a;
    requires T::val;
  };
}
OpenPOWER on IntegriCloud