2 changes: 1 addition & 1 deletion 2 clang/docs/ClangFormatStyleOptions.rst Original file line numberDiff line numberDiff line change @@ -5730,7 +5730,7 @@ Examples === A style similar to the `Linux Kernel style <https://www.kernel.org/doc/Documentation/CodingStyle>`_: <https://...
A style similar to the Linux Kernel style: CopyBasedOnStyle: LLVM IndentWidth: 8 UseTab: Always BreakBeforeBraces: Linux AllowShortIfStatementsOnASingleLine: false IndentCaseLabels: false The result is (imagine that tabs are used for indentation here): Copyvoid test() { switch (x) { case...
上面的例子只是写来测试,要看clang-format的格式化效果,直接在github上看对应项目的代码即可,比如Linux kernel。 uncrustify这工具现在在github维护,也是比较活跃,但我没见过用这个工具格式化的项目,而且上面也给出了格式化的效果,这里就不再测试了。 astyle在sourceforge上,更新并不频繁,格式化选项比较少,比如说没有提...
Some of clang-format's features relevant for the kernel are: * Uses clang's tooling support behind the scenes to parse and rewrite the code. It is not based on ad-hoc regexps. * Supports reasonably well the Linux kernel coding style. * Fast enough to be used at the press of a key...
基于GNU的clang-format修改 基于GNU的默认格式,想修改为函数返回类型后面不换行。 根据官方文档,http://clang.llvm.org/docs/ClangFormatStyleOptions.html, AlwaysBreakAfterDefinitionReturnType已经不建议使用,所以只添加了AlwaysBreakAfterReturnType: None 结果格式化代码函数返回类型后面依然会换行。尝试多次......
If we do some speed benchmark about the search engine on a big source project like a Linux driver with all kernel includes. #!/usr/bin/env python2## -*- coding: utf-8 -*-fromSCAF.API.Analysisimport*analysis=SCAFAnalysis('localhost','login','pwd')analysis.useDatabase('SCAF_driver_w...
This is useful to format files in the tools directory (e.g. selftests) with the same coding style as the kernel. Cc: Miguel Ojeda <ojeda@kernel.org> Cc: Tom Rix <trix@redhat.com> Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20220506160106.52...
clang-format-14 -i security/landlock/*.[ch] include/uapi/linux/landlock.h Link: https://lore.kernel.org/r/20220506160513.523257-3-mic@digikod.net Cc: stable@vger.kernel.org Signed-off-by: Mickaël Salaün <mic@digikod.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation....
Breadcrumbs yosys / .clang-format Latest commit nakengelhardt split CodingReadme into multiple files d9ec35a· Mar 23, 2021 HistoryHistory File metadata and controls Code Blame 13 lines (12 loc) · 277 Bytes Raw # Default Linux style BasedOnStyle: LLVM IndentWidth: 8 UseTab: Always Break...
Simulation platform that enables VHDL-style C++ coding. VCD generation for easy debug. VHDL code generation using C preprocessor. Simple risc-V rv32i SoC example, + Risc-V test suite and gcc bare-metal example. Linux (or WSL) / clang or gcc / risc-v tool