Running Clang-format automatically in CMake

Hi!

Since LLDB code is freshly formatted, it may make sense to run
Clang-format automatically via CMake. If not as part of regular build,
but may be subtarget of install or check targets as it done in Polly.

Eugene.

What would be the gain of such a thing? It would be extremely slow to run clang-format every single time you ran CMake, and also having a run of CMake generate changes to your source tree seems like using the wrong tool for the job. I think we should follow whatever LLVM does, which in this case is that it is each developers’ responsibility to run clang-format before submitting.

There may be a case to be made for presubmit hooks that prevent you from checking in code which doesn’t pass clang-format, but that discussion should happen on llvm-dev@.