determine scope in a RecursiveASTVistor

While Looking at function pointer declarations with a RecursiveASTVistor I’m trying to keep track of their scope.

My original plan was to delimit scope based on Entering/Leaving a CompoundStmt since it looks like its a nice logical grouping, but I noticed in the Doxygen docs nothing inherits this class. I was expecting functions and loops to inherit this.

So now I’m wondering what a good way to go about this is, hopefully still using a RecursiveASTVistor.

Thanks