https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/99433
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hnakamura5 approved this pull request.
https://github.com/llvm/llvm-project/pull/99433
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/99433
>From ebf25d890ff47be48bd153942d943906943a247b Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 17 Jul 2024 22:30:21 -0700
Subject: [PATCH 1/3] [clang-format] Fix a bug in annotating `*` in `#define`s
Fixes #99
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/99433
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> How about judging whether the FunctionLBrace exists as the opener of the
> outer context?
That wouldn't work as we must also handle function calls at the top level when
dealing with macro definitions.
https://github.com/llvm/llvm-project/pull/99433
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/99433
>From ebf25d890ff47be48bd153942d943906943a247b Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 17 Jul 2024 22:30:21 -0700
Subject: [PATCH 1/2] [clang-format] Fix a bug in annotating `*` in `#define`s
Fixes #99
hnakamura5 wrote:
This change certainly fixes the issue, but also seems specific for the reported
code.
For example it does not work well for the case the line contains something else
as,
```
#define FN(N) void fn(void *addr) { a + f(addr, 0, N * two); }
```
This results the annotations where
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Owen Pan (owenca)
Changes
Fixes #99271.
---
Full diff: https://github.com/llvm/llvm-project/pull/99433.diff
2 Files Affected:
- (modified) clang/lib/Format/TokenAnnotator.cpp (+2-1)
- (modified) clang/unittests/Format/TokenAnnot
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/99433
Fixes #99271.
>From ebf25d890ff47be48bd153942d943906943a247b Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Wed, 17 Jul 2024 22:30:21 -0700
Subject: [PATCH] [clang-format] Fix a bug in annotating `*` in `#define`s