Clang-Rename usage multiple files

Hello,

I have managed to compile clang-rename and to get it to rename some symbols.

I have simple example I cant get to work correctly if anyone can help me out it would be greatly appreciated.

3 files:

[foo.c]
int foo (int x, int y)
{
return x + y;
}

[foo.h]
extern int foo (int x, int y);

[main.c]
#include “foo.h”
int main (void)
{
return foo(1, 1);
}

[compile_commands.json]

[
{
“directory”: “c:\ClangRenameTest\”,
“command”: “clang main.c”,
“file”: “main.c”
},
{
“directory”: “c:\ClangRenameTest\”,
“command”: “clang foo.c”,
“file”: “foo.c”
}
]

I run clang-rename with the following arguments:

“clang-rename main.c -offset=50 -i -new-name=sum -pl”

All the instances of foo are renamed to sum except in foo.c.

Can anyone help me how to get clang-rename to work for foo.c also?

Any advice is greatly appreciated.

Dan

Your command invocation only includes main.c, try adding foo.c as well.

-M