Our supplementary LLVM bindings, found in the src/rustllvm/ directory, are a mess. Even basic things like brace style, naming convention, and indentation differ between functions in the same file. This makes it more painful to work with than it has to be. We should settle on a coding style and run clang-format over the file.
Which style is chosen is less important than that it's used consistently, but since that library is dealing with LLVM APIs and little else, the LLVM style seems like the obvious candidate. It's also built into clang-format so no configuration is needed.
Concrete tasks:
Our supplementary LLVM bindings, found in the
src/rustllvm/directory, are a mess. Even basic things like brace style, naming convention, and indentation differ between functions in the same file. This makes it more painful to work with than it has to be. We should settle on a coding style and runclang-formatover the file.Which style is chosen is less important than that it's used consistently, but since that library is dealing with LLVM APIs and little else, the LLVM style seems like the obvious candidate. It's also built into
clang-formatso no configuration is needed.Concrete tasks:
clang-formatwith any style (Making code style consistent for src/rustllvm (#38688) #38701)nullptrinstead ofNULL(Making code style consistent for src/rustllvm (#38688) #38701)ValvsValue) (Improve naming style in rustllvm. #38745)