由于C/Cpp的格式化程序是共用的,使用如下语句对C语言程序进行Cpp兼容
#ifdef __cplusplus extern "C" { #endif ...... #ifdef __cplusplus } #endif
会导致{}间的代码被胡乱初始化,缩进量乱七八糟
clangformat
需要将'.clang-format'文件中的'IndentExternBlock'条目改为'NoIndent',针对性解决