clang 23.0.0git
Sarif.h
Go to the documentation of this file.
1//== clang/Basic/Sarif.h - SARIF Diagnostics Object Model -------*- C++ -*--==//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8/// \file
9/// Defines clang::SarifDocumentWriter, clang::SarifRule, clang::SarifResult.
10///
11/// The document built can be accessed as a JSON Object.
12/// Several value semantic types are also introduced which represent properties
13/// of the SARIF standard, such as 'artifact', 'result', 'rule'.
14///
15/// A SARIF (Static Analysis Results Interchange Format) document is JSON
16/// document that describes in detail the results of running static analysis
17/// tools on a project. Each (non-trivial) document consists of at least one
18/// "run", which are themselves composed of details such as:
19/// * Tool: The tool that was run
20/// * Rules: The rules applied during the tool run, represented by
21/// \c reportingDescriptor objects in SARIF
22/// * Results: The matches for the rules applied against the project(s) being
23/// evaluated, represented by \c result objects in SARIF
24///
25/// Reference:
26/// 1. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html">The SARIF standard</a>
27/// 2. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317836">SARIF<pre>reportingDescriptor</pre></a>
28/// 3. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317638">SARIF<pre>result</pre></a>
29//===----------------------------------------------------------------------===//
30
31#ifndef LLVM_CLANG_BASIC_SARIF_H
32#define LLVM_CLANG_BASIC_SARIF_H
33
35#include "clang/Basic/Version.h"
36#include "llvm/ADT/ArrayRef.h"
37#include "llvm/ADT/SmallVector.h"
38#include "llvm/ADT/StringMap.h"
39#include "llvm/ADT/StringRef.h"
40#include "llvm/Support/JSON.h"
41#include <cassert>
42#include <cstddef>
43#include <cstdint>
44#include <initializer_list>
45#include <optional>
46#include <string>
47
48namespace clang {
49
51class SourceManager;
52
53namespace detail {
54
55/// \internal
56/// An artifact location is SARIF's way of describing the complete location
57/// of an artifact encountered during analysis. The \c artifactLocation object
58/// typically consists of a URI, and/or an index to reference the artifact it
59/// locates.
60///
61/// This builder makes an additional assumption: that every artifact encountered
62/// by \c clang will be a physical, top-level artifact. Which is why the static
63/// creation method \ref SarifArtifactLocation::create takes a mandatory URI
64/// parameter. The official standard states that either a \c URI or \c Index
65/// must be available in the object, \c clang picks the \c URI as a reasonable
66/// default, because it intends to deal in physical artifacts for now.
67///
68/// Reference:
69/// 1. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317427">artifactLocation object</a>
70/// 2. \ref SarifArtifact
71class SarifArtifactLocation {
72private:
74
75 std::optional<uint32_t> Index;
76 std::string URI;
77
78 SarifArtifactLocation() = delete;
79 explicit SarifArtifactLocation(const std::string &URI) : URI(URI) {}
80
81public:
82 static SarifArtifactLocation create(llvm::StringRef URI) {
83 return SarifArtifactLocation{URI.str()};
84 }
85
86 SarifArtifactLocation setIndex(uint32_t Idx) {
87 Index = Idx;
88 return *this;
89 }
90};
91
92/// \internal
93/// An artifact in SARIF is any object (a sequence of bytes) addressable by
94/// a URI (RFC 3986). The most common type of artifact for clang's use-case
95/// would be source files. SARIF's artifact object is described in detail in
96/// section 3.24.
97//
98/// Since every clang artifact MUST have a location (there being no nested
99/// artifacts), the creation method \ref SarifArtifact::create requires a
100/// \ref SarifArtifactLocation object.
101///
102/// Reference:
103/// 1. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317611">artifact object</a>
104class SarifArtifact {
105private:
107
108 std::optional<uint32_t> Offset;
109 std::optional<size_t> Length;
110 std::string MimeType;
111 SarifArtifactLocation Location;
113
114 SarifArtifact() = delete;
115
116 explicit SarifArtifact(const SarifArtifactLocation &Loc) : Location(Loc) {}
117
118public:
119 static SarifArtifact create(const SarifArtifactLocation &Loc) {
120 return SarifArtifact{Loc};
121 }
122
123 SarifArtifact setOffset(uint32_t ArtifactOffset) {
124 Offset = ArtifactOffset;
125 return *this;
126 }
127
128 SarifArtifact setLength(size_t NumBytes) {
129 Length = NumBytes;
130 return *this;
131 }
132
133 SarifArtifact setRoles(std::initializer_list<llvm::StringRef> ArtifactRoles) {
134 Roles.assign(ArtifactRoles.begin(), ArtifactRoles.end());
135 return *this;
136 }
137
138 SarifArtifact setMimeType(llvm::StringRef ArtifactMimeType) {
139 MimeType = ArtifactMimeType.str();
140 return *this;
141 }
142};
143
144} // namespace detail
145
147
148/// The level of severity associated with a \ref SarifResult.
149///
150/// Of all the levels, \c None is the only one that is not associated with
151/// a failure.
152///
153/// A typical mapping for clang's DiagnosticKind to SarifResultLevel would look
154/// like:
155/// * \c None: \ref clang::DiagnosticsEngine::Level::Remark, \ref clang::DiagnosticsEngine::Level::Ignored
156/// * \c Note: \ref clang::DiagnosticsEngine::Level::Note
157/// * \c Warning: \ref clang::DiagnosticsEngine::Level::Warning
158/// * \c Error could be generated from one of:
159/// - \ref clang::DiagnosticsEngine::Level::Warning with \c -Werror
160/// - \ref clang::DiagnosticsEngine::Level::Error
161/// - \ref clang::DiagnosticsEngine::Level::Fatal when \ref clang::DiagnosticsEngine::ErrorsAsFatal is set.
162///
163/// Reference:
164/// 1. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317648">level property</a>
166
167/// A thread flow is a sequence of code locations that specify a possible path
168/// through a single thread of execution.
169/// A thread flow in SARIF is related to a code flow which describes
170/// the progress of one or more programs through one or more thread flows.
171///
172/// Reference:
173/// 1. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317744">threadFlow object</a>
174/// 2. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317740">codeFlow object</a>
175class ThreadFlow {
177
178 CharSourceRange Range;
179 ThreadFlowImportance Importance;
180 std::string Message;
181
182 ThreadFlow() = default;
183
184public:
185 static ThreadFlow create() { return {}; }
186
187 ThreadFlow setRange(const CharSourceRange &ItemRange) {
188 assert(ItemRange.isCharRange() &&
189 "ThreadFlows require a character granular source range!");
190 Range = ItemRange;
191 return *this;
192 }
193
194 ThreadFlow setImportance(const ThreadFlowImportance &ItemImportance) {
195 Importance = ItemImportance;
196 return *this;
197 }
198
199 ThreadFlow setMessage(llvm::StringRef ItemMessage) {
200 Message = ItemMessage.str();
201 return *this;
202 }
203};
204
205/// A SARIF Reporting Configuration (\c reportingConfiguration) object contains
206/// properties for a \ref SarifRule that can be configured at runtime before
207/// analysis begins.
208///
209/// Reference:
210/// 1. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317852">reportingConfiguration object</a>
211class SarifReportingConfiguration {
213
214 bool Enabled = true;
216 float Rank = -1.0f;
217
218 SarifReportingConfiguration() = default;
219
220public:
221 static SarifReportingConfiguration create() { return {}; };
222
223 SarifReportingConfiguration disable() {
224 Enabled = false;
225 return *this;
226 }
227
228 SarifReportingConfiguration enable() {
229 Enabled = true;
230 return *this;
231 }
232
233 SarifReportingConfiguration setLevel(SarifResultLevel TheLevel) {
234 Level = TheLevel;
235 return *this;
236 }
237
238 SarifReportingConfiguration setRank(float TheRank) {
239 assert(TheRank >= 0.0f && "Rule rank cannot be smaller than 0.0");
240 assert(TheRank <= 100.0f && "Rule rank cannot be larger than 100.0");
241 Rank = TheRank;
242 return *this;
243 }
244};
245
246/// A SARIF rule (\c reportingDescriptor object) contains information that
247/// describes a reporting item generated by a tool. A reporting item is
248/// either a result of analysis or notification of a condition encountered by
249/// the tool. Rules are arbitrary but are identifiable by a hierarchical
250/// rule-id.
251///
252/// This builder provides an interface to create SARIF \c reportingDescriptor
253/// objects via the \ref SarifRule::create static method.
254///
255/// Reference:
256/// 1. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317836">reportingDescriptor object</a>
257class SarifRule {
259
260 std::string Name;
261 std::string Id;
262 std::string Description;
263 std::string HelpURI;
264 std::vector<std::string> DeprecatedIds;
265 SarifReportingConfiguration DefaultConfiguration;
266
267 SarifRule() : DefaultConfiguration(SarifReportingConfiguration::create()) {}
268
269public:
270 static SarifRule create() { return {}; }
271
272 SarifRule setName(llvm::StringRef RuleName) {
273 Name = RuleName.str();
274 return *this;
275 }
276
277 SarifRule setRuleId(llvm::StringRef RuleId) {
278 Id = RuleId.str();
279 return *this;
280 }
281
282 SarifRule setDescription(llvm::StringRef RuleDesc) {
283 Description = RuleDesc.str();
284 return *this;
285 }
286
287 SarifRule setHelpURI(llvm::StringRef RuleHelpURI) {
288 HelpURI = RuleHelpURI.str();
289 return *this;
290 }
291
294 DeprecatedIds.assign(RuleDeprecatedIds.begin(), RuleDeprecatedIds.end());
295 return *this;
296 }
297
300 DefaultConfiguration = Configuration;
301 return *this;
302 }
303};
304
305/// A SARIF result (also called a "reporting item") is a unit of output
306/// produced when one of the tool's \c reportingDescriptor encounters a match
307/// on the file being analysed by the tool.
308///
309/// This builder provides a \ref SarifResult::create static method that can be
310/// used to create an empty shell onto which attributes can be added using the
311/// \c setX(...) methods.
312///
313/// For example:
314/// \code{.cpp}
315/// SarifResult result = SarifResult::create(...)
316/// .setRuleId(...)
317/// .setDiagnosticMessage(...);
318/// \endcode
319///
320/// Reference:
321/// 1. <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317638">SARIF<pre>result</pre></a>
322class SarifResult {
324
325 // NOTE:
326 // This type cannot fit all possible indexes representable by JSON, but is
327 // chosen because it is the largest unsigned type that can be safely
328 // converted to an \c int64_t.
329 uint32_t RuleIdx;
330 std::string RuleId;
331 std::string DiagnosticMessage;
332 std::string HostedViewerURI;
333 llvm::SmallDenseMap<StringRef, std::string, 4> PartialFingerprints;
337 std::optional<SarifResultLevel> LevelOverride;
338
339 SarifResult() = delete;
340 explicit SarifResult(uint32_t RuleIdx) : RuleIdx(RuleIdx) {}
341
342public:
343 static SarifResult create(uint32_t RuleIdx) { return SarifResult{RuleIdx}; }
344
345 SarifResult setIndex(uint32_t Idx) {
346 RuleIdx = Idx;
347 return *this;
348 }
349
350 SarifResult setRuleId(llvm::StringRef Id) {
351 RuleId = Id.str();
352 return *this;
353 }
354
355 SarifResult setDiagnosticMessage(llvm::StringRef Message) {
356 DiagnosticMessage = Message.str();
357 return *this;
358 }
359
360 SarifResult setHostedViewerURI(llvm::StringRef URI) {
361 HostedViewerURI = URI.str();
362 return *this;
363 }
364
366#ifndef NDEBUG
367 for (const auto &Loc : DiagLocs) {
368 assert(Loc.isCharRange() &&
369 "SARIF Results require character granular source ranges!");
370 }
371#endif
372 Locations.append(DiagLocs.begin(), DiagLocs.end());
373 return *this;
374 }
375
377#ifndef NDEBUG
378 for (const auto &Loc : DiagLocs) {
379 assert(
380 Loc.isCharRange() &&
381 "SARIF RelatedLocations require character granular source ranges!");
382 }
383#endif
384 RelatedLocations.append(DiagLocs.begin(), DiagLocs.end());
385 return *this;
386 }
387
388 SarifResult setThreadFlows(llvm::ArrayRef<ThreadFlow> ThreadFlowResults) {
389 ThreadFlows.assign(ThreadFlowResults.begin(), ThreadFlowResults.end());
390 return *this;
391 }
392
393 SarifResult setDiagnosticLevel(const SarifResultLevel &TheLevel) {
394 LevelOverride = TheLevel;
395 return *this;
396 }
397
398 SarifResult addPartialFingerprint(llvm::StringRef key,
399 llvm::StringRef value) {
400 PartialFingerprints[key] = value;
401 return *this;
402 }
403};
404
405/// This class handles creating a valid SARIF document given various input
406/// attributes. However, it requires an ordering among certain method calls:
407///
408/// 1. Because every SARIF document must contain at least 1 \c run, callers
409/// must ensure that \ref SarifDocumentWriter::createRun is called before
410/// any other methods.
411/// 2. If SarifDocumentWriter::endRun is called, callers MUST call
412/// SarifDocumentWriter::createRun, before invoking any of the result
413/// aggregation methods such as SarifDocumentWriter::appendResult etc.
415private:
416 const llvm::StringRef SchemaURI{
417 "https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos02/schemas/"
418 "sarif-schema-2.1.0.json"};
419 const llvm::StringRef SchemaVersion{"2.1.0"};
420
421 /// \internal
422 /// Return a pointer to the current tool. Asserts that a run exists.
423 llvm::json::Object &getCurrentTool();
424
425 /// \internal
426 /// Checks if there is a run associated with this document.
427 ///
428 /// \return true on success
429 bool hasRun() const;
430
431 /// \internal
432 /// Reset portions of the internal state so that the document is ready to
433 /// receive data for a new run.
434 void reset();
435
436 /// \internal
437 /// Return a mutable reference to the current run, after asserting it exists.
438 ///
439 /// \note It is undefined behavior to call this if a run does not exist in
440 /// the SARIF document.
441 llvm::json::Object &getCurrentRun();
442
443 /// Create a code flow object for the given threadflows.
444 /// See \ref ThreadFlow.
445 ///
446 /// \note It is undefined behavior to call this if a run does not exist in
447 /// the SARIF document.
448 llvm::json::Object
449 createCodeFlow(const llvm::ArrayRef<ThreadFlow> ThreadFlows);
450
451 /// Add the given threadflows to the ones this SARIF document knows about.
452 llvm::json::Array
453 createThreadFlows(const llvm::ArrayRef<ThreadFlow> ThreadFlows);
454
455 /// Add the given \ref CharSourceRange to the SARIF document as a physical
456 /// location, with its corresponding artifact.
457 llvm::json::Object createPhysicalLocation(const CharSourceRange &R);
458
459public:
461
462 /// Create a new empty SARIF document with the given source manager.
463 SarifDocumentWriter(const SourceManager &SourceMgr) : SourceMgr(SourceMgr) {}
464
465 /// Release resources held by this SARIF document.
467
468 /// Create a new run with which any upcoming analysis will be associated.
469 /// Each run requires specifying the tool that is generating reporting items.
470 void createRun(const llvm::StringRef ShortToolName,
471 const llvm::StringRef LongToolName,
472 const llvm::StringRef ToolVersion = CLANG_VERSION_STRING);
473
474 /// If there is a current run, end it.
475 ///
476 /// This method collects various book-keeping required to clear and close
477 /// resources associated with the current run, but may also allocate some
478 /// for the next run.
479 ///
480 /// Calling \ref endRun before associating a run through \ref createRun leads
481 /// to undefined behaviour.
482 void endRun();
483
484 /// Associate the given rule with the current run.
485 ///
486 /// Returns an integer rule index for the created rule that is unique within
487 /// the current run, which can then be used to create a \ref SarifResult
488 /// to add to the current run. Note that a rule must exist before being
489 /// referenced by a result.
490 ///
491 /// \pre
492 /// There must be a run associated with the document, failing to do so will
493 /// cause undefined behaviour.
494 size_t createRule(const SarifRule &Rule);
495
496 /// Append a new result to the currently in-flight run.
497 ///
498 /// \pre
499 /// There must be a run associated with the document, failing to do so will
500 /// cause undefined behaviour.
501 /// \pre
502 /// \c RuleIdx used to create the result must correspond to a rule known by
503 /// the SARIF document. It must be the value returned by a previous call
504 /// to \ref createRule.
506
507 /// Return the SARIF document in its current state.
508 /// Calling this will trigger a copy of the internal state including all
509 /// reported diagnostics, resulting in an expensive call.
510 llvm::json::Object createDocument();
511
512 static std::string fileNameToURI(llvm::StringRef Filename);
513
514private:
515 /// Source Manager to use for the current SARIF document.
516 const SourceManager &SourceMgr;
517
518 /// Flag to track the state of this document:
519 /// A closed document is one on which a new runs must be created.
520 /// This could be a document that is freshly created, or has recently
521 /// finished writing to a previous run.
522 bool Closed = true;
523
524 /// A sequence of SARIF runs.
525 /// Each run object describes a single run of an analysis tool and contains
526 /// the output of that run.
527 ///
528 /// Reference: <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317484">run object</a>
529 llvm::json::Array Runs;
530
531 /// The list of rules associated with the most recent active run. These are
532 /// defined using the diagnostics passed to the SarifDocument. Each rule
533 /// need not be unique through the result set. E.g. there may be several
534 /// 'syntax' errors throughout code under analysis, each of which has its
535 /// own specific diagnostic message (and consequently, RuleId). Rules are
536 /// also known as "reportingDescriptor" objects in SARIF.
537 ///
538 /// Reference: <a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317556">rules property</a>
540
541 /// The list of artifacts that have been encountered on the most recent active
542 /// run. An artifact is defined in SARIF as a sequence of bytes addressable
543 /// by a URI. A common example for clang's case would be files named by
544 /// filesystem paths.
545 llvm::StringMap<detail::SarifArtifact> CurrentArtifacts;
546};
547} // namespace clang
548
549#endif // LLVM_CLANG_BASIC_SARIF_H
Defines the clang::SourceLocation class and associated facilities.
Defines version macros and version-related utility functions for Clang.
Represents a byte-granular source range.
This class handles creating a valid SARIF document given various input attributes.
Definition Sarif.h:414
~SarifDocumentWriter()=default
Release resources held by this SARIF document.
SarifDocumentWriter(const SourceManager &SourceMgr)
Create a new empty SARIF document with the given source manager.
Definition Sarif.h:463
void createRun(const llvm::StringRef ShortToolName, const llvm::StringRef LongToolName, const llvm::StringRef ToolVersion=CLANG_VERSION_STRING)
Create a new run with which any upcoming analysis will be associated.
Definition Sarif.cpp:345
size_t createRule(const SarifRule &Rule)
Associate the given rule with the current run.
Definition Sarif.cpp:381
static std::string fileNameToURI(llvm::StringRef Filename)
Definition Sarif.cpp:70
llvm::json::Object createDocument()
Return the SARIF document in its current state.
Definition Sarif.cpp:437
void endRun()
If there is a current run, end it.
Definition Sarif.cpp:260
void appendResult(const SarifResult &SarifResult)
Append a new result to the currently in-flight run.
Definition Sarif.cpp:387
A SARIF Reporting Configuration (reportingConfiguration) object contains properties for a SarifRule t...
Definition Sarif.h:211
static SarifReportingConfiguration create()
Definition Sarif.h:221
SarifReportingConfiguration disable()
Definition Sarif.h:223
SarifReportingConfiguration enable()
Definition Sarif.h:228
SarifReportingConfiguration setLevel(SarifResultLevel TheLevel)
Definition Sarif.h:233
SarifReportingConfiguration setRank(float TheRank)
Definition Sarif.h:238
A SARIF result (also called a "reporting item") is a unit of output produced when one of the tool's r...
Definition Sarif.h:322
SarifResult setIndex(uint32_t Idx)
Definition Sarif.h:345
SarifResult setHostedViewerURI(llvm::StringRef URI)
Definition Sarif.h:360
SarifResult setThreadFlows(llvm::ArrayRef< ThreadFlow > ThreadFlowResults)
Definition Sarif.h:388
SarifResult setDiagnosticMessage(llvm::StringRef Message)
Definition Sarif.h:355
SarifResult setRuleId(llvm::StringRef Id)
Definition Sarif.h:350
SarifResult addPartialFingerprint(llvm::StringRef key, llvm::StringRef value)
Definition Sarif.h:398
SarifResult addLocations(llvm::ArrayRef< CharSourceRange > DiagLocs)
Definition Sarif.h:365
SarifResult addRelatedLocations(llvm::ArrayRef< CharSourceRange > DiagLocs)
Definition Sarif.h:376
SarifResult setDiagnosticLevel(const SarifResultLevel &TheLevel)
Definition Sarif.h:393
static SarifResult create(uint32_t RuleIdx)
Definition Sarif.h:343
A SARIF rule (reportingDescriptor object) contains information that describes a reporting item genera...
Definition Sarif.h:257
SarifRule setDescription(llvm::StringRef RuleDesc)
Definition Sarif.h:282
SarifRule setHelpURI(llvm::StringRef RuleHelpURI)
Definition Sarif.h:287
SarifRule setDeprecatedIds(llvm::ArrayRef< llvm::StringRef > RuleDeprecatedIds)
Definition Sarif.h:293
SarifRule setRuleId(llvm::StringRef RuleId)
Definition Sarif.h:277
static SarifRule create()
Definition Sarif.h:270
SarifRule setDefaultConfiguration(const SarifReportingConfiguration &Configuration)
Definition Sarif.h:299
SarifRule setName(llvm::StringRef RuleName)
Definition Sarif.h:272
This class handles loading and caching of source files into memory.
friend class SarifDocumentWriter
Definition Sarif.h:176
ThreadFlow setImportance(const ThreadFlowImportance &ItemImportance)
Definition Sarif.h:194
ThreadFlow setRange(const CharSourceRange &ItemRange)
Definition Sarif.h:187
static ThreadFlow create()
Definition Sarif.h:185
ThreadFlow setMessage(llvm::StringRef ItemMessage)
Definition Sarif.h:199
SarifArtifactLocation setIndex(uint32_t Idx)
Definition Sarif.h:86
static SarifArtifactLocation create(llvm::StringRef URI)
Definition Sarif.h:82
SarifArtifact setOffset(uint32_t ArtifactOffset)
Definition Sarif.h:123
SarifArtifact setMimeType(llvm::StringRef ArtifactMimeType)
Definition Sarif.h:138
static SarifArtifact create(const SarifArtifactLocation &Loc)
Definition Sarif.h:119
SarifArtifact setRoles(std::initializer_list< llvm::StringRef > ArtifactRoles)
Definition Sarif.h:133
SarifArtifact setLength(size_t NumBytes)
Definition Sarif.h:128
The JSON file list parser is used to communicate input to InstallAPI.
SarifResultLevel
The level of severity associated with a SarifResult.
Definition Sarif.h:165
ThreadFlowImportance
Definition Sarif.h:146
@ None
The alignment was not explicit in code.
Definition ASTContext.h:179