//===-- PathDiagnosticConsumers.def - Visualizing warnings ------*- 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 set of path diagnostic consumers - objects that
// implement different representations of static analysis results.
//
//===----------------------------------------------------------------------===//

#ifndef ANALYSIS_DIAGNOSTICS
#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN)
#endif

ANALYSIS_DIAGNOSTICS(HTML, "html", "Output analysis results using HTML",
                     createHTMLDiagnosticConsumer)

ANALYSIS_DIAGNOSTICS(
    HTML_SINGLE_FILE, "html-single-file",
    "Output analysis results using HTML (not allowing for multi-file bugs)",
    createHTMLSingleFileDiagnosticConsumer)

ANALYSIS_DIAGNOSTICS(PLIST, "plist", "Output analysis results using Plists",
                     createPlistDiagnosticConsumer)

ANALYSIS_DIAGNOSTICS(
    PLIST_MULTI_FILE, "plist-multi-file",
    "Output analysis results using Plists (allowing for multi-file bugs)",
    createPlistMultiFileDiagnosticConsumer)

ANALYSIS_DIAGNOSTICS(PLIST_HTML, "plist-html",
                     "Output analysis results using HTML wrapped with Plists",
                     createPlistHTMLDiagnosticConsumer)

ANALYSIS_DIAGNOSTICS(SARIF, "sarif", "Output analysis results in a SARIF file",
                     createSarifDiagnosticConsumer)

ANALYSIS_DIAGNOSTICS(TEXT, "text", "Text output of analysis results to stderr",
                     createTextPathDiagnosticConsumer)

ANALYSIS_DIAGNOSTICS(TEXT_MINIMAL, "text-minimal",
                     "Emits minimal diagnostics to stderr, stating only the "
                     "warning message and the associated notes. Usually "
                     "used in addition to other analysis types",
                     createTextMinimalPathDiagnosticConsumer)

#undef ANALYSIS_DIAGNOSTICS
