Remove code duplication and cut dependency from clangRewrite on
clangAST.