[RISCV][FMV] Support target_clones (#85786)
[llvm-project.git] / clang / test / clang-rename / MemberExprMacro.cpp
blob56cd8d95f6e88287109df567c8926863c3cfc818
1 class Baz {
2 public:
3 int Foo; /* Test 1 */ // CHECK: int Bar;
4 };
6 int qux(int x) { return 0; }
7 #define MACRO(a) qux(a)
9 int main() {
10 Baz baz;
11 baz.Foo = 1; /* Test 2 */ // CHECK: baz.Bar = 1;
12 MACRO(baz.Foo); // CHECK: MACRO(baz.Bar);
13 int y = baz.Foo; // CHECK: int y = baz.Bar;
16 // Test 1.
17 // RUN: clang-rename -offset=26 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
18 // Test 2.
19 // RUN: clang-rename -offset=155 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
21 // To find offsets after modifying the file, use:
22 // grep -Ubo 'Foo.*' <file>