[cfe-dev] Match callback invocation order

Stephen Kelly via cfe-dev cfe-dev at lists.llvm.org
Sat Jun 20 09:26:38 PDT 2020

On 19/06/2020 15:38, Billy O'Mahony wrote:
> Hi Stephen,
> thanks for the input.
> Fortunately it's just C I'm interested in.
> It's not just the order of certain function calls that are relevant; 
> the ordering of some conditional expressions and return stmts are also 
> relevant. And some of them are done via macros in which case, if I 
> recall, I see the source location being the location of the macro 
> definition - not the location of the macro usage.

Yes, macros add complexity.

> It still sounds to me like MatchFinder is not doing exactly what it 
> says on the tin "The order of matches is guaranteed to be equivalent 
> to doing a pre-order traversal on the AST, and applying the matchers 
> in the order in which they were added to the MatchFinder."

Yes, this is at least a documentation bug, if the implementation isn't 



More information about the cfe-dev mailing list