[all-commits] [llvm/llvm-project] 2d0b45: [clang-format] Prevent re-assigning type on finali...

johnnyb2543 via All-commits all-commits at lists.llvm.org
Thu Jul 30 14:28:31 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d0b45bc0a7fcb29aa77242b9262eb7c9eba5333
      https://github.com/llvm/llvm-project/commit/2d0b45bc0a7fcb29aa77242b9262eb7c9eba5333
  Author: johnnyb2543 <134093951+johnnyb2543 at users.noreply.github.com>
  Date:   2026-07-30 (Thu, 30 Jul 2026)

  Changed paths:
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Prevent re-assigning type on finalized tokens (#210763)

Prevents a finalized token inside modifyContext from being reassigned
through the setType member function by checking if the token is
finalized.

This ensures ill-defined code like does not trigger an assertion failure
during reformatting.
Fixes #210509



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list