Derek Bruening via llvm-dev
2016-Apr-28 16:39 UTC
[llvm-dev] code style for test programs: CamelCase?
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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160428/9863d557/attachment.html>
Justin Bogner via llvm-dev
2016-Apr-28 17:32 UTC
[llvm-dev] code style for test programs: CamelCase?
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.
Yaron Keren via llvm-dev
2016-Apr-28 19:24 UTC
[llvm-dev] code style for test programs: CamelCase?
For C++ code it's easiest to use clang-format which by default implements the LLVM style. 2016-04-28 20:32 GMT+03:00 Justin Bogner via llvm-dev < llvm-dev at lists.llvm.org>:> > 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 testfiles> > 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. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160428/f2d20f3a/attachment.html>
Possibly Parallel Threads
- [LLVMdev] RFC: variable names
- amount of camelCase refactoring causing some downstream overhead
- amount of camelCase refactoring causing some downstream overhead
- [LLVMdev] Naming conventions in LLVM code
- amount of camelCase refactoring causing some downstream overhead