This is my personal memo to summarise a way to use self-build clang tool chain with Xcode for Objective-C project. Probably we can take same approach for Swift project.
In this way, we can take many extra approaches like analyse source code, apply modifications on the source code (source-to-source translation,) and so on.