跳转至

StatementAttributeLikeMacros

StatementAttributeLikeMacros (List of Strings)

Info

clang-format 12

在语句前面被忽略的宏,就像它们是一个属性一样。这样它们就不会被解析为标识符,例如 Qts emit

AlignConsecutiveDeclarations: true
StatementAttributeLikeMacros: []
unsigned char data = 'x';
emit          signal(data); //被解析为变量声明。
AlignConsecutiveDeclarations: true
StatementAttributeLikeMacros: [emit]
unsigned char data = 'x';
emit signal(data); //现在又好了。

最后更新: 2022-10-31