[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-09-06 Thread kadir çetinkaya via cfe-commits
kadircet wrote: there still seems to be a regression when the operator is `-`, filed https://github.com/llvm/llvm-project/issues/107568 https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-28 Thread Krasimir Georgiev via cfe-commits
krasimirgg wrote: Ohh sorry, I had started with a stale clang-format commit. This is a non-issue at HEAD. https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-28 Thread Pierre Jolivet via cfe-commits
prj- wrote: What's your version? ``` $ clang-format-20 gh.txt void a() { double b = ((double)c(0)) * d / (double)0; } ``` https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-28 Thread Krasimir Georgiev via cfe-commits
krasimirgg wrote: It appears that this introduced a regression in code like this: ``` int d = 0; int c(int i) { return i; } void a() { double b = ((double)c(0)) * d / (double)0; } ``` After this patch, the last line gets formatted as: ``` void a() { double b = ((double)c(0))*d / (double)0; } ```

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-09 Thread Pierre Jolivet via cfe-commits
prj- wrote: Nevermind, this bug (not sure if it's a bug or not) is already present in clang-format 18. See https://github.com/llvm/llvm-project/issues/102727. https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-09 Thread Pierre Jolivet via cfe-commits
prj- wrote: This introduced a regression though. ```diff - for (i = 0, k = 1; i < ((PetscInt)local_n0) * partial_dim; i++, k++) { + for (i = 0, k = 1; i < ((PetscInt)local_n0)*partial_dim; i++, k++) { ``` https://github.com/llvm/llvm-project/pull/102261

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Pierre Jolivet via cfe-commits
prj- wrote: Thank you very much. https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Owen Pan via cfe-commits
owenca wrote: > I'm sorry I'm not familiar with LLVM release cycle, but is it too late for > this to make it into the `release/19.x` branch? It's not too late, but in general we backport bug fixes only if the bugs are labeled as `invalid-code-generation`, `crash-on-valid`, or `regression`. In

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Pierre Jolivet via cfe-commits
prj- wrote: I'm sorry I'm not familiar with LLVM release cycle, but is it too late for this to make it into the `release/19.x` branch? https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-07 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/102261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #102102. --- Full diff: https://github.com/llvm/llvm-project/pull/102261.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+10-1) - (modified) clang/unittests/Format/TokenAn

[clang] [clang-format] Fix a bug in annotating CastRParen (PR #102261)

2024-08-06 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/102261 Fixes #102102. >From b72a629d16d5bc3ce800a562fd41ba2dfd1fe1eb Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 6 Aug 2024 18:10:20 -0700 Subject: [PATCH] [clang-format] Fix a bug in annotating CastRParen Fixe