llvm/clang/include/clang/Analysis/PathDiagnostic.h

//===- PathDiagnostic.h - Path-Specific Diagnostic Handling -----*- 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
//
//===----------------------------------------------------------------------===//
//
//  This file defines the PathDiagnostic-related interfaces.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_ANALYSIS_PATHDIAGNOSTIC_H
#define LLVM_CLANG_ANALYSIS_PATHDIAGNOSTIC_H

#include "clang/AST/Stmt.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Allocator.h"
#include <cassert>
#include <deque>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <utility>
#include <vector>

namespace clang {

class AnalysisDeclContext;
class BinaryOperator;
class CallEnter;
class CallExitEnd;
class ConditionalOperator;
class Decl;
class LocationContext;
class MemberExpr;
class ProgramPoint;
class SourceManager;

namespace ento {

//===----------------------------------------------------------------------===//
// High-level interface for handlers of path-sensitive diagnostics.
//===----------------------------------------------------------------------===//

class PathDiagnostic;

/// These options tweak the behavior of path diangostic consumers.
/// Most of these options are currently supported by very few consumers.
struct PathDiagnosticConsumerOptions {};

class PathDiagnosticConsumer {};

//===----------------------------------------------------------------------===//
// Path-sensitive diagnostics.
//===----------------------------------------------------------------------===//

class PathDiagnosticRange : public SourceRange {};

LocationOrAnalysisDeclContext;

class PathDiagnosticLocation {};

class PathDiagnosticLocationPair {};

//===----------------------------------------------------------------------===//
// Path "pieces" for path-sensitive diagnostics.
//===----------------------------------------------------------------------===//

class PathDiagnosticPiece: public llvm::FoldingSetNode {};

PathDiagnosticPieceRef;

class PathPieces : public std::list<PathDiagnosticPieceRef> {};

class PathDiagnosticSpotPiece : public PathDiagnosticPiece {};

class PathDiagnosticEventPiece : public PathDiagnosticSpotPiece {};

class PathDiagnosticCallPiece : public PathDiagnosticPiece {};

class PathDiagnosticControlFlowPiece : public PathDiagnosticPiece {};

class PathDiagnosticMacroPiece : public PathDiagnosticSpotPiece {};

class PathDiagnosticNotePiece: public PathDiagnosticSpotPiece {};

class PathDiagnosticPopUpPiece: public PathDiagnosticSpotPiece {};

/// File IDs mapped to sets of line numbers.
FilesToLineNumsMap;

/// PathDiagnostic - PathDiagnostic objects represent a single path-sensitive
///  diagnostic.  It represents an ordered-collection of PathDiagnosticPieces,
///  each which represent the pieces of the path.
class PathDiagnostic : public llvm::FoldingSetNode {};

} // namespace ento
} // namespace clang

#endif // LLVM_CLANG_ANALYSIS_PATHDIAGNOSTIC_H