[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / clang-rename / TemplateTypename.cpp
blob559ec1f9ade75d9b66044da0734e70bee98ae569
1 template <typename T /* Test 1 */> // CHECK: template <typename U /* Test 1 */>
2 class Foo {
3 T foo(T arg, T& ref, T* /* Test 2 */ ptr) { // CHECK: U foo(U arg, U& ref, U* /* Test 2 */ ptr) {
4 T value; // CHECK: U value;
5 int number = 42;
6 value = (T)number; // CHECK: value = (U)number;
7 value = static_cast<T /* Test 3 */>(number); // CHECK: value = static_cast<U /* Test 3 */>(number);
8 return value;
11 static void foo(T value) {} // CHECK: static void foo(U value) {}
13 T member; // CHECK: U member;
16 // Test 1.
17 // RUN: clang-rename -offset=19 -new-name=U %s -- -fno-delayed-template-parsing | sed 's,//.*,,' | FileCheck %s
18 // Test 2.
19 // RUN: clang-rename -offset=126 -new-name=U %s -- -fno-delayed-template-parsing | sed 's,//.*,,' | FileCheck %s
20 // Test 3.
21 // RUN: clang-rename -offset=392 -new-name=U %s -- -fno-delayed-template-parsing | sed 's,//.*,,' | FileCheck %s
23 // To find offsets after modifying the file, use:
24 // grep -Ubo 'T.*' <file>