llvm/clang-tools-extra/include-cleaner/lib/TypesInternal.h

//===--- TypesInternal.h - Intermediate structures used for analysis C++-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef CLANG_INCLUDE_CLEANER_TYPESINTERNAL_H
#define CLANG_INCLUDE_CLEANER_TYPESINTERNAL_H

#include "clang/Basic/SourceLocation.h"
#include "clang/Tooling/Inclusions/StandardLibrary.h"
#include "llvm/ADT/BitmaskEnum.h"
#include <cstdint>
#include <utility>
#include <variant>

namespace llvm {
class raw_ostream;
}
namespace clang::include_cleaner {
/// A place where a symbol can be provided.
/// It is either a physical file of the TU (SourceLocation) or a logical
/// location in the standard library (stdlib::Symbol).
struct SymbolLocation {};
llvm::raw_ostream &operator<<(llvm::raw_ostream &, const SymbolLocation &);

/// Represents properties of a symbol provider.
///
/// Hints represents the properties of the edges traversed when finding headers
/// that satisfy an AST node (AST node => symbols => locations => headers).
///
/// Since there can be multiple paths from an AST node to same header, we need
/// to merge hints. These hints are merged by taking the union of all the
/// properties along all the paths. We choose the boolean sense accordingly,
/// e.g. "Public" rather than "Private", because a header is good if it provides
/// any public definition, even if it also provides private ones.
///
/// Hints are sorted in ascending order of relevance.
enum class Hints : uint8_t {};
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
/// A wrapper to augment values with hints.
template <typename T> struct Hinted : public T {};

} // namespace clang::include_cleaner

#endif