[all-commits] [llvm/llvm-project] 8c31b6: [clang-format] Use an enum for context types. NFC

eywdck2l via All-commits all-commits at lists.llvm.org
Mon Mar 21 14:58:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c31b68f4876ca81fa2038b5b2990b3d7b53a77c
      https://github.com/llvm/llvm-project/commit/8c31b68f4876ca81fa2038b5b2990b3d7b53a77c
  Author: sstwcw <f0gukp2nk at protonmail.com>
  Date:   2022-03-21 (Mon, 21 Mar 2022)

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

  Log Message:
  -----------
  [clang-format] Use an enum for context types. NFC

We currently have all those fields in AnnotatingParser::Context.  They
are not inherited from the Context object for the parent scope.  They
are exclusive.  Now they are replaced with an enum.

`InCpp11AttributeSpecifier` and `InCSharpAttributeSpecifier` are not
handled like the rest in ContextType because they are not exclusive.

Reviewed By: curdeius, MyDeveloperDay, HazardyKnusperkeks, owenpan

Differential Revision: https://reviews.llvm.org/D121907




More information about the All-commits mailing list