[clang][lex] NFCI: Use DirectoryEntryRef in ModuleMap::inferFrameworkModule()
[llvm-project.git] / clang / test / clang-rename / DeclRefExpr.cpp
blob6462862d82adfa1edd16d902f81e011e80d102b8
1 class C {
2 public:
3 static int Foo; /* Test 1 */ // CHECK: static int Bar;
4 };
6 int foo(int x) { return 0; }
7 #define MACRO(a) foo(a)
9 int main() {
10 C::Foo = 1; /* Test 2 */ // CHECK: C::Bar = 1;
11 MACRO(C::Foo); // CHECK: MACRO(C::Bar);
12 int y = C::Foo; /* Test 3 */ // CHECK: int y = C::Bar;
13 return 0;
16 // Test 1.
17 // RUN: clang-rename -offset=31 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
18 // Test 2.
19 // RUN: clang-rename -offset=152 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
20 // Test 3.
21 // RUN: clang-rename -offset=271 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s
23 // To find offsets after modifying the file, use:
24 // grep -Ubo 'Foo.*' <file>