[llvm-dev] code style for test programs: CamelCase?

Justin Bogner via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 28 10:32:33 PDT 2016


Derek Bruening via llvm-dev <llvm-dev at lists.llvm.org> writes:
> Hi everyone, I have a code style question: should full test programs
> (.c,.cpp files) use the documented CamelCase from
> http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
> or
> instead use lower_with_underscores as I've been told the .ll lit test files
> should use?  I see both in existing files, and in particular for
> projects/compiler-rt I cannot blindly follow the existing code as the
> existing sanitizers were added with a separate style, with the consensus
> being that new sanitizer files should switch to the LLVM style.

When in doubt follow the LLVM style. Most cases where you see C++ code
that doesn't follow it are from before we codified the style in the
docs.


More information about the llvm-dev mailing list