You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
weggli operates on the raw sources (so before any preprocessing takes place). At this stage, a preprocessor macro is comparable to a plain search-and-replace operation. This means that foo in this context has no additional meaning (it is just text). Here, you'd search for the wrapper_call instead (as this is used as an call identifier from wegglis point of view):
#define wrapper_call(arg1) foo(arg1)
void helloworld() {
for (int i = 0; i < 10; i++) {
printf("Hello World: %d\n", wrapper_call(i));
}
}
If you really need to have the preprocessor macros resolved, you would need to run the source code through a compiler first. For example with gcc -E:
Hi,
I am trying to use weggli to check of usages of an API call.
The API call is wrapped in a macro
When I try to search for foo
It doesn't see the foo usage in that macro.
Can anyone who ran into a similar issue perhaps if this is expected behaviour ?
The text was updated successfully, but these errors were encountered: