[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / clang-rename / UserDefinedConversion.cpp
blob60f251ab448358f07c1272a7e38acf1cc34fb3a8
1 class Foo { /* Test 1 */ // CHECK: class Bar {
2 public:
3 Foo() {} // CHECK: Bar() {}
4 };
6 class Baz {
7 public:
8 operator Foo() /* Test 2 */ const { // CHECK: operator Bar() /* Test 2 */ const {
9 Foo foo; // CHECK: Bar foo;
10 return foo;
14 int main() {
15 Baz boo;
16 Foo foo = static_cast<Foo>(boo); // CHECK: Bar foo = static_cast<Bar>(boo);
17 return 0;
20 // Test 1.
21 // RUN: clang-rename -offset=7 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
22 // Test 2.
23 // RUN: clang-rename -offset=164 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
25 // To find offsets after modifying the file, use:
26 // grep -Ubo 'Foo.*' <file>