[all-commits] [llvm/llvm-project] 75cbb1: [clang-format][NFC] Add FormatToken::is(tok::ObjCK...

Owen Pan via All-commits all-commits at lists.llvm.org
Wed Apr 9 17:49:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 75cbb1f0fa734efb79c1a1233f1aba377dfad9e1
      https://github.com/llvm/llvm-project/commit/75cbb1f0fa734efb79c1a1233f1aba377dfad9e1
  Author: Owen Pan <owenpiano at gmail.com>
  Date:   2025-04-09 (Wed, 09 Apr 2025)

  Changed paths:
    M clang/lib/Format/Format.cpp
    M clang/lib/Format/FormatToken.h
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/lib/Format/UnwrappedLineFormatter.cpp
    M clang/lib/Format/UnwrappedLineParser.cpp

  Log Message:
  -----------
  [clang-format][NFC] Add FormatToken::is(tok::ObjCKeywordKind) (#134973)

This allows simplification of code that checks if a token is an
Objective-C keyword.

Also, delete the following in
UnwrappedLineParser::parseStructuralElement():
- an else-after-break in the tok::at case
- the copypasted code in the tok::objc_autoreleasepool case



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