[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / clang-rename / VariableMacro.cpp
blob622e825d3e41a02ddf28bbd03cf0c453bcbadb70
1 #define Baz Foo // CHECK: #define Baz Bar
3 void foo(int value) {}
5 void macro() {
6 int Foo; /* Test 1 */ // CHECK: int Bar;
7 Foo = 42; /* Test 2 */ // CHECK: Bar = 42;
8 Baz -= 0;
9 foo(Foo); /* Test 3 */ // CHECK: foo(Bar);
10 foo(Baz);
13 // Test 1.
14 // RUN: clang-rename -offset=88 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
15 // Test 2.
16 // RUN: clang-rename -offset=129 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
17 // Test 3.
18 // RUN: clang-rename -offset=191 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
20 // To find offsets after modifying the file, use:
21 // grep -Ubo 'Foo.*' <file>