Stopping the execution of an ASTConsumer


I’m using Clang to parse a file with C source code in order to search for some annotations previously I have defined. When the visitor finds an annotation, it’s supposed to invoke a function that makes some source-to-source transformations in the file passed. But, in some cases, the annotation format can be incorrect, so the code visiting should be stopped, not visiting any node anymore. Is that possible?



ASTConsumers don't currently have this ability, although it would be fairly easy to introduce.

  - Doug