clang 17.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::SarifResult Class Reference

A SARIF result (also called a "reporting item") is a unit of output produced when one of the tool's reportingDescriptor encounters a match on the file being analysed by the tool. More...

#include "clang/Basic/Sarif.h"

Public Member Functions

SarifResult setIndex (uint32_t Idx)
 
SarifResult setRuleId (llvm::StringRef Id)
 
SarifResult setDiagnosticMessage (llvm::StringRef Message)
 
SarifResult setLocations (llvm::ArrayRef< CharSourceRange > DiagLocs)
 
SarifResult setThreadFlows (llvm::ArrayRef< ThreadFlow > ThreadFlowResults)
 
SarifResult setDiagnosticLevel (const SarifResultLevel &TheLevel)
 

Static Public Member Functions

static SarifResult create (uint32_t RuleIdx)
 

Friends

class clang::SarifDocumentWriter
 

Detailed Description

A SARIF result (also called a "reporting item") is a unit of output produced when one of the tool's reportingDescriptor encounters a match on the file being analysed by the tool.

This builder provides a SarifResult::create static method that can be used to create an empty shell onto which attributes can be added using the setX(...) methods.

For example:

.setRuleId(...)
A SARIF result (also called a "reporting item") is a unit of output produced when one of the tool's r...
Definition: Sarif.h:315
SarifResult setDiagnosticMessage(llvm::StringRef Message)
Definition: Sarif.h:345
SarifResult setRuleId(llvm::StringRef Id)
Definition: Sarif.h:340
static SarifResult create(uint32_t RuleIdx)
Definition: Sarif.h:333

Reference:

  1. SARIFresult</a‍

Definition at line 315 of file Sarif.h.

Member Function Documentation

◆ create()

static SarifResult clang::SarifResult::create ( uint32_t  RuleIdx)
inlinestatic

Definition at line 333 of file Sarif.h.

Referenced by createResult(), and clang::SARIFDiagnostic::emitDiagnosticMessage().

◆ setDiagnosticLevel()

SarifResult clang::SarifResult::setDiagnosticLevel ( const SarifResultLevel TheLevel)
inline

Definition at line 365 of file Sarif.h.

Referenced by createResult().

◆ setDiagnosticMessage()

SarifResult clang::SarifResult::setDiagnosticMessage ( llvm::StringRef  Message)
inline

Definition at line 345 of file Sarif.h.

Referenced by createResult(), and clang::SARIFDiagnostic::emitDiagnosticMessage().

◆ setIndex()

SarifResult clang::SarifResult::setIndex ( uint32_t  Idx)
inline

Definition at line 335 of file Sarif.h.

◆ setLocations()

SarifResult clang::SarifResult::setLocations ( llvm::ArrayRef< CharSourceRange DiagLocs)
inline

Definition at line 350 of file Sarif.h.

Referenced by createResult().

◆ setRuleId()

SarifResult clang::SarifResult::setRuleId ( llvm::StringRef  Id)
inline

Definition at line 340 of file Sarif.h.

References Id.

Referenced by createResult().

◆ setThreadFlows()

SarifResult clang::SarifResult::setThreadFlows ( llvm::ArrayRef< ThreadFlow ThreadFlowResults)
inline

Definition at line 360 of file Sarif.h.

Friends And Related Function Documentation

◆ clang::SarifDocumentWriter

friend class clang::SarifDocumentWriter
friend

Definition at line 316 of file Sarif.h.


The documentation for this class was generated from the following file: