[clang] [clang-format] Fix a bug in formating `#define A x:` (PR #73220)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 24 16:59:27 PST 2023
================
@@ -1171,6 +1171,13 @@ void UnwrappedLineParser::parsePPDefine() {
assert((int)Line->PPLevel >= 0);
Line->InMacroBody = true;
+ if (FormatTok->is(tok::identifier) &&
+ Tokens->peekNextToken()->is(tok::colon)) {
+ nextToken();
+ nextToken();
+ addUnwrappedLine();
----------------
owenca wrote:
Good catch!
https://github.com/llvm/llvm-project/pull/73220
More information about the cfe-commits
mailing list