Clang Project

clang_source_code/test/clang-rename/FunctionMacro.cpp
1#define moo foo           // CHECK: #define moo macro_function
2
3int foo() /* Test 1 */ {  // CHECK: int macro_function() /* Test 1 */ {
4  return 42;
5}
6
7void boo(int value) {}
8
9void qoo() {
10  foo();                  // CHECK: macro_function();
11  boo(foo());             // CHECK: boo(macro_function());
12  moo();
13  boo(moo());
14}
15
16// Test 1.
17// RUN: clang-rename -offset=68 -new-name=macro_function %s -- | sed 's,//.*,,' | FileCheck %s
18
19// To find offsets after modifying the file, use:
20//   grep -Ubo 'foo.*' <file>
21