CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
87 lines
5.0 KiB
C++
87 lines
5.0 KiB
C++
// RUN: mkdir -p %t.dir/move-template-class
|
|
// RUN: cp %S/Inputs/template_class_test* %t.dir/move-template-class
|
|
// RUN: cd %t.dir/move-template-class
|
|
// RUN: clang-move -names="A,B" -new_cc=%t.dir/move-template-class/new_template_class_test.cpp -new_header=%t.dir/move-template-class/new_template_class_test.h -old_cc=%t.dir/move-template-class/template_class_test.cpp -old_header=../move-template-class/template_class_test.h %t.dir/move-template-class/template_class_test.cpp --
|
|
// RUN: FileCheck -input-file=%t.dir/move-template-class/template_class_test.cpp -check-prefix=CHECK-OLD-TEST-EMPTY -allow-empty %s
|
|
// RUN: FileCheck -input-file=%t.dir/move-template-class/template_class_test.h -check-prefix=CHECK-OLD-TEST-EMPTY -allow-empty %s
|
|
// RUN: FileCheck -input-file=%t.dir/move-template-class/new_template_class_test.cpp -check-prefix=CHECK-NEW-TEST-CPP-CASE1 %s
|
|
// RUN: FileCheck -input-file=%t.dir/move-template-class/new_template_class_test.h -check-prefix=CHECK-NEW-TEST-H-CASE1 %s
|
|
//
|
|
// RUN: cp %S/Inputs/template_class_test* %t.dir/move-template-class
|
|
// RUN: clang-move -names="A" -new_cc=%t.dir/move-template-class/new_template_class_test.cpp -new_header=%t.dir/move-template-class/new_template_class_test.h -old_cc=%t.dir/move-template-class/template_class_test.cpp -old_header=../move-template-class/template_class_test.h %t.dir/move-template-class/template_class_test.cpp --
|
|
// RUN: FileCheck -input-file=%t.dir/move-template-class/template_class_test.h -check-prefix=CHECK-OLD-TEST-H-CASE2 %s
|
|
// RUN: FileCheck -input-file=%t.dir/move-template-class/template_class_test.cpp -check-prefix=CHECK-OLD-TEST-CPP-CASE2 %s
|
|
// RUN: FileCheck -input-file=%t.dir/move-template-class/new_template_class_test.h -check-prefix=CHECK-NEW-TEST-H-CASE2 %s
|
|
// RUN: FileCheck -input-file=%t.dir/move-template-class/new_template_class_test.cpp -check-prefix=CHECK-NEW-TEST-CPP-CASE2 %s
|
|
//
|
|
//
|
|
// CHECK-OLD-TEST-EMPTY: {{^}}{{$}}
|
|
//
|
|
// CHECK-NEW-TEST-H-CASE1: #ifndef TEMPLATE_CLASS_TEST_H // comment 1
|
|
// CHECK-NEW-TEST-H-CASE1: #define TEMPLATE_CLASS_TEST_H
|
|
// CHECK-NEW-TEST-H-CASE1: template <typename T>
|
|
// CHECK-NEW-TEST-H-CASE1: class A {
|
|
// CHECK-NEW-TEST-H-CASE1: public:
|
|
// CHECK-NEW-TEST-H-CASE1: void f();
|
|
// CHECK-NEW-TEST-H-CASE1: void g();
|
|
// CHECK-NEW-TEST-H-CASE1: template <typename U> void h();
|
|
// CHECK-NEW-TEST-H-CASE1: template <typename U> void k();
|
|
// CHECK-NEW-TEST-H-CASE1: static int b;
|
|
// CHECK-NEW-TEST-H-CASE1: static int c;
|
|
// CHECK-NEW-TEST-H-CASE1: };
|
|
// CHECK-NEW-TEST-H-CASE1: template <typename T>
|
|
// CHECK-NEW-TEST-H-CASE1: void A<T>::f() {}
|
|
// CHECK-NEW-TEST-H-CASE1: template <typename T>
|
|
// CHECK-NEW-TEST-H-CASE1: template <typename U>
|
|
// CHECK-NEW-TEST-H-CASE1: void A<T>::h() {}
|
|
// CHECK-NEW-TEST-H-CASE1: template <typename T>
|
|
// CHECK-NEW-TEST-H-CASE1: int A<T>::b = 2;
|
|
// CHECK-NEW-TEST-H-CASE1: class B {
|
|
// CHECK-NEW-TEST-H-CASE1: public:
|
|
// CHECK-NEW-TEST-H-CASE1: void f();
|
|
// CHECK-NEW-TEST-H-CASE1: };
|
|
// CHECK-NEW-TEST-H-CASE1: #endif // TEMPLATE_CLASS_TEST_H
|
|
//
|
|
// CHECK-NEW-TEST-CPP-CASE1: #include "{{.*}}new_template_class_test.h"
|
|
// CHECK-NEW-TEST-CPP-CASE1: template <typename T>
|
|
// CHECK-NEW-TEST-CPP-CASE1: void A<T>::g() {}
|
|
// CHECK-NEW-TEST-CPP-CASE1: template <typename T>
|
|
// CHECK-NEW-TEST-CPP-CASE1: template <typename U>
|
|
// CHECK-NEW-TEST-CPP-CASE1: void A<T>::k() {}
|
|
// CHECK-NEW-TEST-CPP-CASE1: template <typename T>
|
|
// CHECK-NEW-TEST-CPP-CASE1: int A<T>::c = 2;
|
|
// CHECK-NEW-TEST-CPP-CASE1: void B::f() {}
|
|
//
|
|
// CHECK-OLD-TEST-H-CASE2: #ifndef TEMPLATE_CLASS_TEST_H // comment 1
|
|
// CHECK-OLD-TEST-H-CASE2: #define TEMPLATE_CLASS_TEST_H
|
|
// CHECK-OLD-TEST-H-CASE2: class B {
|
|
// CHECK-OLD-TEST-H-CASE2: public:
|
|
// CHECK-OLD-TEST-H-CASE2: void f();
|
|
// CHECK-OLD-TEST-H-CASE2: };
|
|
// CHECK-OLD-TEST-H-CASE2: #endif // TEMPLATE_CLASS_TEST_H
|
|
//
|
|
// CHECK-OLD-TEST-CPP-CASE2: #include "template_class_test.h"
|
|
// CHECK-OLD-TEST-CPP-CASE2: void B::f() {}
|
|
//
|
|
// CHECK-NEW-TEST-H-CASE2: #ifndef {{.*}}NEW_TEMPLATE_CLASS_TEST_H
|
|
// CHECK-NEW-TEST-H-CASE2: #define {{.*}}NEW_TEMPLATE_CLASS_TEST_H
|
|
// CHECK-NEW-TEST-H-CASE2: template <typename T>
|
|
// CHECK-NEW-TEST-H-CASE2: class A {
|
|
// CHECK-NEW-TEST-H-CASE2: public:
|
|
// CHECK-NEW-TEST-H-CASE2: void f();
|
|
// CHECK-NEW-TEST-H-CASE2: void g();
|
|
// CHECK-NEW-TEST-H-CASE2: template <typename U> void h();
|
|
// CHECK-NEW-TEST-H-CASE2: template <typename U> void k();
|
|
// CHECK-NEW-TEST-H-CASE2: static int b;
|
|
// CHECK-NEW-TEST-H-CASE2: static int c;
|
|
// CHECK-NEW-TEST-H-CASE2: };
|
|
// CHECK-NEW-TEST-H-CASE2: template <typename T> void A<T>::f() {}
|
|
// CHECK-NEW-TEST-H-CASE2: template <typename T> template <typename U> void A<T>::h() {}
|
|
// CHECK-NEW-TEST-H-CASE2: template <typename T> int A<T>::b = 2;
|
|
// CHECK-NEW-TEST-H-CASE2: #endif // {{.*}}NEW_TEMPLATE_CLASS_TEST_H
|
|
//
|
|
// CHECK-NEW-TEST-CPP-CASE2: #include "{{.*}}new_template_class_test.h"
|
|
// CHECK-NEW-TEST-CPP-CASE2: template <typename T> void A<T>::g() {}
|
|
// CHECK-NEW-TEST-CPP-CASE2: template <typename T> template <typename U> void A<T>::k() {}
|
|
// CHECK-NEW-TEST-CPP-CASE2: template <typename T> int A<T>::c = 2;
|