#1842: clang-format options not valid for versions <=3.5 ---------------------+------------------------------------------------------ Reporter: knarf | Owner: Type: defect | Status: new Priority: unset | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------
Comment (by eschnett):
Since the global .clang-format file doesn't work, the option to use seems to be: {{{ clang-format -style="{BasedOnStyle: LLVM, Standard: Cpp03}" }}}
Unfortunately, it seems that different clang-format versions make slightly different decisions regarding how to break lines or how to interpret ampersand characters. (The latter are difficult to interpret if one doesn't have full type information.) It thus seems that re-formatting everything with different versions of clang-format leads to changes.
I'm using clang-format 3.7, the latest released version. Clang is relatively easy to install (easier than GCC), and we should be able to decide on a single version for the Einstein Toolkit. For example, Ubuntu LTS currently provides version 3.6.