[clang] [clang-format] Prevent re-assigning type on finalized tokens (PR #210763)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 26 12:52:58 PDT 2026
================
@@ -2310,7 +2310,7 @@ class AnnotatingParser {
break;
if (Previous->isOneOf(TT_BinaryOperator, TT_UnaryOperator) &&
Previous->isPointerOrReference() && Previous->Previous &&
- Previous->Previous->isNot(tok::equal)) {
+ Previous->Previous->isNot(tok::equal) && !Previous->isTypeFinalized()) {
----------------
HazardyKnusperkeks wrote:
I'd move the check right behind `isOneOf`.
https://github.com/llvm/llvm-project/pull/210763
More information about the cfe-commits
mailing list