1 //===--- IncludeStyle.cpp - Style of C++ #include directives -----*- C++-*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "clang/Tooling/Inclusions/IncludeStyle.h"
11 using clang::tooling::IncludeStyle;
16 void MappingTraits<IncludeStyle::IncludeCategory>::mapping(
17 IO &IO, IncludeStyle::IncludeCategory &Category) {
18 IO.mapOptional("Regex", Category.Regex);
19 IO.mapOptional("Priority", Category.Priority);
22 void ScalarEnumerationTraits<IncludeStyle::IncludeBlocksStyle>::enumeration(
23 IO &IO, IncludeStyle::IncludeBlocksStyle &Value) {
24 IO.enumCase(Value, "Preserve", IncludeStyle::IBS_Preserve);
25 IO.enumCase(Value, "Merge", IncludeStyle::IBS_Merge);
26 IO.enumCase(Value, "Regroup", IncludeStyle::IBS_Regroup);