https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/73220
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/73220
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mydeveloperday approved this pull request.
https://github.com/llvm/llvm-project/pull/73220
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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();
+
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/73220
>From 0a8459053be654313efff8002ff3e171d8cd9d18 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 23 Nov 2023 00:41:41 -0800
Subject: [PATCH 1/2] [clang-format] Fix a bug in formating `#define A x:`
Fixed
@@ -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();
+
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Owen Pan (owenca)
Changes
Fixed #70789.
---
Full diff: https://github.com/llvm/llvm-project/pull/73220.diff
2 Files Affected:
- (modified) clang/lib/Format/UnwrappedLineParser.cpp (+7)
- (modified)
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/73220
Fixed #70789.
>From 0a8459053be654313efff8002ff3e171d8cd9d18 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Thu, 23 Nov 2023 00:41:41 -0800
Subject: [PATCH] [clang-format] Fix a bug in formating `#define A x:`