I was trying to compose a matcher that finds global variables that does not have static storage
This is what I have so far
varDecl(hasGlobalStorage(), isDefinition())
Accoring to Clang AST Matcher Reference
hasGlobalStorage will also match static variables inside function bodies
I don't want to match 'y' variable
How do I do that?
You can use isLocalVarDecl method.