clang 22.0.0git
HTMLDiagnostics.cpp File Reference
#include "PlistDiagnostics.h"
#include "SarifDiagnostics.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/Stmt.h"
#include "clang/Analysis/IssueHash.h"
#include "clang/Analysis/MacroExpansionContext.h"
#include "clang/Analysis/PathDiagnostic.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/Token.h"
#include "clang/Rewrite/Core/HTMLRewrite.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h"
#include "llvm/ADT/RewriteBuffer.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Sequence.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <system_error>
#include <utility>
#include <vector>

Go to the source code of this file.

Functions

static void createHTMLDiagnosticConsumerImpl (PathDiagnosticConsumerOptions DiagOpts, PathDiagnosticConsumers &C, const std::string &OutputDir, const Preprocessor &PP, bool SupportMultipleFiles)
 Creates and registers an HTML diagnostic consumer, without any additional text consumer.
static llvm::SmallString< 32 > getIssueHash (const PathDiagnostic &D, const Preprocessor &PP)
static bool shouldDisplayPopUpRange (const SourceRange &Range)
static void HandlePopUpPieceStartTag (Rewriter &R, const std::vector< SourceRange > &PopUpRanges)
static void HandlePopUpPieceEndTag (Rewriter &R, const PathDiagnosticPopUpPiece &Piece, std::vector< SourceRange > &PopUpRanges, unsigned int LastReportedPieceIndex, unsigned int PopUpPieceIndex)
static void EmitAlphaCounter (raw_ostream &os, unsigned n)
static std::string getSpanBeginForControl (const char *ClassName, unsigned Index)
static std::string getSpanBeginForControlStart (unsigned Index)
static std::string getSpanBeginForControlEnd (unsigned Index)

Function Documentation

◆ createHTMLDiagnosticConsumerImpl()

void createHTMLDiagnosticConsumerImpl ( PathDiagnosticConsumerOptions DiagOpts,
PathDiagnosticConsumers & C,
const std::string & OutputDir,
const Preprocessor & PP,
bool SupportMultipleFiles )
static

Creates and registers an HTML diagnostic consumer, without any additional text consumer.

Definition at line 176 of file HTMLDiagnostics.cpp.

References clang::C.

◆ EmitAlphaCounter()

void EmitAlphaCounter ( raw_ostream & os,
unsigned n )
static

Definition at line 1014 of file HTMLDiagnostics.cpp.

◆ getIssueHash()

◆ getSpanBeginForControl()

std::string getSpanBeginForControl ( const char * ClassName,
unsigned Index )
static

Definition at line 1067 of file HTMLDiagnostics.cpp.

◆ getSpanBeginForControlEnd()

std::string getSpanBeginForControlEnd ( unsigned Index)
static

Definition at line 1079 of file HTMLDiagnostics.cpp.

References max().

◆ getSpanBeginForControlStart()

std::string getSpanBeginForControlStart ( unsigned Index)
static

Definition at line 1075 of file HTMLDiagnostics.cpp.

◆ HandlePopUpPieceEndTag()

void HandlePopUpPieceEndTag ( Rewriter & R,
const PathDiagnosticPopUpPiece & Piece,
std::vector< SourceRange > & PopUpRanges,
unsigned int LastReportedPieceIndex,
unsigned int PopUpPieceIndex )
static

Definition at line 647 of file HTMLDiagnostics.cpp.

◆ HandlePopUpPieceStartTag()

void HandlePopUpPieceStartTag ( Rewriter & R,
const std::vector< SourceRange > & PopUpRanges )
static

Definition at line 635 of file HTMLDiagnostics.cpp.

◆ shouldDisplayPopUpRange()

bool shouldDisplayPopUpRange ( const SourceRange & Range)
static

Definition at line 630 of file HTMLDiagnostics.cpp.