RecursiveASTVisitor and PragmaHandler

Hi,

I am currently writing a clang plugin, which does some transformation on for-loops. I have implemented a pragma handler, which is called back just fine. But now I am puzzled how to get the current state of the pragma in the RecursiveASTVisitor:

#pragma mypragma on

for ( i = 0; i < 5; i++) {

}

#pragma mypragma off

Thanks

Marcel

Hi,

I am currently writing a clang plugin, which does some transformation on for-loops. I have implemented a pragma handler, which is called back just fine. But now I am puzzled how to get the current state of the pragma in the RecursiveASTVisitor

The easiest would be to extend the loop-hint pragma. See what I did for loop-distribution: https://reviews.llvm.org/D19403.

Adam