[DFAJumpThreading] Remove incoming StartBlock from all phis when unfolding select...
[llvm-project.git] / clang-tools-extra / test / clang-change-namespace / lambda-function.cpp
blob452983ea9c41842f350c37d8316dcad50c307eef
1 // RUN: clang-change-namespace -old_namespace "na::nb" -new_namespace "x::y" --file_pattern ".*" %s -- -std=c++11 | sed 's,// CHECK.*,,' | FileCheck %s
3 template <class T>
4 class function;
5 template <class R, class... ArgTypes>
6 class function<R(ArgTypes...)> {
7 public:
8 template <typename Functor>
9 function(Functor f) {}
10 R operator()(ArgTypes...) const {}
13 namespace x {
14 // CHECK: namespace x {
15 class X {};
18 namespace na {
19 namespace nb {
20 // CHECK: namespace x {
21 // CHECK-NEXT: namespace y {
22 void f(function<void(int)> func, int param) { func(param); }
23 void g() { f([](int x) {}, 1); }
25 // x::X in function type parameter list will have translation unit context, so
26 // we simply replace it with fully-qualified name.
27 using TX = function<x::X(x::X)>;
28 // CHECK: using TX = function<X(x::X)>;
30 class A {};
31 using TA = function<A(A)>;
32 // CHECK: using TA = function<A(A)>;
34 // CHECK: } // namespace y
35 // CHECK-NEXT: } // namespace x