The easiest option (also the easiest to change) is to add the CC build flag. Go to the settings of the project or the target assembly and select "Editor" → "Add build settings" → "Add custom settings" in the menu.

Name the CC flag and set the value for the path to your Clang binary.

You can choose whether you want to use this compiler for all assemblies or just debug assemblies (this makes sense, for example, when using experimental and / or self-modified versions of Clang).
Please note that for functions such as autocomplete, symbolic search, etc., Xcode does not use the Clang binary libraries, as well as other LLVM libraries distributed with Xcode. I described how to replace the ones that are in another post (this is more or less the same approach that you took). By changing only the Clang version, you may receive different warnings after compilation than those that appear in the editor as you type.
source share