[Ubuntu] How to specify clang version due to cannot get UE4.19 compiled with clang 6.0.0

Generated Unreal Project by UE4.19 under Ubuntu. However, the project (not the editor) cannot be compiled with clang 6.0.0 under CodeLite.
Here, as a new in UE4 under Linux, I’d like to get your shares about working it out. Thanks in advanced

$ clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic

UE4.19 cannot be compiled with clang 600, so has removed it and installed clang501.
Consolidated with googled information on various web-pages @ https://www.jianshu.com/p/0fe8cf8288be

First remove all clang versions.

sudo apt --purge remove clang*

Now its time to figure out which version of clang do you need.

But according to Building on Linux:Clang documentation by Unreal, you have to know what version of clang you need to install, apparently dependent on your OS distribution.
The link directly takes you to the Clang Section

For example if you have Ubuntu 16.04 or newer, use clang-3.8. Else using 4.0.1 should be ok imo

Now time to install and configure clang. For this post, I am assuming that you use 16.04+. So I’ll focus on clang-3.8
Change your version accordingly

sudo apt-get install clang-3.8

This will install clang-3.8 on your system. If you want any other versions, depending on your distro,

 sudo apt-get install clang- *<don't press Enter yet>*

Now press TAB a few times, this should list all possible versions of clang, that can be installed.
I suggest you install 3.8 for Ubuntu 16.04+ cause that is advised to use in the Documentation

So if you installed clang-3.8, we still need to configure it as the default clang provider.

Replace 3.8 with your version of clang, if required. Also if you installed 4.0.1 instead of 4.0, I mean 3 digits instead of 2, then make sure to use x.y.z version name, so as to avoid any further problems in the future

First comes clang++

sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.8 100

Now do the same thing with clang

sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.8 100

Now check which version of clang is installed

clang --version

This should fix the problem for clang and now you should be able to compile UE4.