How to detect call expressions in macro declaration

Hello everyone,
I'm using RecursiveASTVisitor to traverse call expressions.
Is there a way to differentiate between calls inside a macro declaration and
other calls?

for example, in the following code I would like to know when I'm in
some_function() and when I'm in MACRO_CALL

void some_function();
#define MACRO_CALL some_function()

void main() {
   some_function();
   MACRO_CALL;
}

Thank you

Hi,
  you can get the location by some class like getLoc or
SourceManager::getExpansionLoc,if the object is a macro,the locations is
different.maybe help you.

Rambo

I looked into it and I indeed get the same location for multiple macro calls,
but this means that I have to handle the first call and ignore the others.

I found a different way to achieve that:
the functions SourceLocation::isMacroID() &&
SourceManager::isMacroArgExpansion() gives me exactly the information I
needed.

Thanks again!