aaron.ballman added a comment. You've explained how you are accomplishing this but not why. I don't think Clang typically keeps erroneous AST nodes in the tree. What kind of problem is this intended to solve? https://reviews.llvm.org/D26350