clang 22.0.0git
DiagnosticIDs.h
Go to the documentation of this file.
1//===--- DiagnosticIDs.h - Diagnostic IDs Handling --------------*- 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///
9/// \file
10/// Defines the Diagnostic IDs-related interfaces.
11///
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_BASIC_DIAGNOSTICIDS_H
15#define LLVM_CLANG_BASIC_DIAGNOSTICIDS_H
16
18#include "clang/Basic/LLVM.h"
19#include "llvm/ADT/IntrusiveRefCntPtr.h"
20#include "llvm/ADT/StringRef.h"
21#include "llvm/Support/ErrorHandling.h"
22#include <optional>
23#include <vector>
24
25namespace clang {
26class DiagnosticsEngine;
28class LangOptions;
29class SourceLocation;
30
31// Import the diagnostic enums themselves.
32namespace diag {
33enum class Group;
34
35// Size of each of the diagnostic categories.
36enum {
51};
52// Start position for diagnostics.
53// clang-format off
54enum {
70};
71// clang-format on
72
73class CustomDiagInfo;
74
75/// All of the diagnostics that can be emitted by the frontend.
76typedef unsigned kind;
77
78/// Enum values that allow the client to map NOTEs, WARNINGs, and EXTENSIONs
79/// to either Ignore (nothing), Remark (emit a remark), Warning
80/// (emit a warning) or Error (emit as an error). It allows clients to
81/// map ERRORs to Error or Fatal (stop emitting diagnostics after this one).
82enum class Severity : uint8_t {
83 // NOTE: 0 means "uncomputed".
84 Ignored = 1, ///< Do not present this diagnostic, ignore it.
85 Remark = 2, ///< Present this diagnostic as a remark.
86 Warning = 3, ///< Present this diagnostic as a warning.
87 Error = 4, ///< Present this diagnostic as an error.
88 Fatal = 5 ///< Present this diagnostic as a fatal error.
89};
90
91/// Flavors of diagnostics we can emit. Used to filter for a particular
92/// kind of diagnostic (for instance, for -W/-R flags).
93enum class Flavor {
94 WarningOrError, ///< A diagnostic that indicates a problem or potential
95 ///< problem. Can be made fatal by -Werror.
96 Remark ///< A diagnostic that indicates normal progress through
97 ///< compilation.
98};
99} // end namespace diag
100} // end namespace clang
101
102// This has to be included *after* the DIAG_START_ enums above are defined.
103#include "clang/Basic/DiagnosticCommonInterface.inc"
104
105namespace clang {
107 LLVM_PREFERRED_TYPE(diag::Severity)
108 unsigned Severity : 3;
109 LLVM_PREFERRED_TYPE(bool)
110 unsigned IsUser : 1;
111 LLVM_PREFERRED_TYPE(bool)
112 unsigned IsPragma : 1;
113 LLVM_PREFERRED_TYPE(bool)
114 unsigned HasNoWarningAsError : 1;
115 LLVM_PREFERRED_TYPE(bool)
116 unsigned HasNoErrorAsFatal : 1;
117 LLVM_PREFERRED_TYPE(bool)
118 unsigned WasUpgradedFromWarning : 1;
119
120public:
121 static DiagnosticMapping Make(diag::Severity Severity, bool IsUser,
122 bool IsPragma) {
124 Result.Severity = (unsigned)Severity;
125 Result.IsUser = IsUser;
126 Result.IsPragma = IsPragma;
127 Result.HasNoWarningAsError = 0;
128 Result.HasNoErrorAsFatal = 0;
129 Result.WasUpgradedFromWarning = 0;
130 return Result;
131 }
132
133 diag::Severity getSeverity() const { return (diag::Severity)Severity; }
135
136 bool isUser() const { return IsUser; }
137 bool isPragma() const { return IsPragma; }
138
139 bool isErrorOrFatal() const {
142 }
143
144 bool hasNoWarningAsError() const { return HasNoWarningAsError; }
145 void setNoWarningAsError(bool Value) { HasNoWarningAsError = Value; }
146
147 bool hasNoErrorAsFatal() const { return HasNoErrorAsFatal; }
148 void setNoErrorAsFatal(bool Value) { HasNoErrorAsFatal = Value; }
149
150 /// Whether this mapping attempted to map the diagnostic to a warning, but
151 /// was overruled because the diagnostic was already mapped to an error or
152 /// fatal error.
153 bool wasUpgradedFromWarning() const { return WasUpgradedFromWarning; }
154 void setUpgradedFromWarning(bool Value) { WasUpgradedFromWarning = Value; }
155
156 /// Serialize this mapping as a raw integer.
157 unsigned serialize() const {
158 return (IsUser << 7) | (IsPragma << 6) | (HasNoWarningAsError << 5) |
159 (HasNoErrorAsFatal << 4) | (WasUpgradedFromWarning << 3) | Severity;
160 }
161 /// Deserialize a mapping.
162 static DiagnosticMapping deserialize(unsigned Bits) {
164 Result.IsUser = (Bits >> 7) & 1;
165 Result.IsPragma = (Bits >> 6) & 1;
166 Result.HasNoWarningAsError = (Bits >> 5) & 1;
167 Result.HasNoErrorAsFatal = (Bits >> 4) & 1;
168 Result.WasUpgradedFromWarning = (Bits >> 3) & 1;
169 Result.Severity = Bits & 0x7;
170 return Result;
171 }
172
174 return serialize() == Other.serialize();
175 }
176};
177
178/// Used for handling and querying diagnostic IDs.
179///
180/// Can be used and shared by multiple Diagnostics for multiple translation
181/// units.
182class DiagnosticIDs : public RefCountedBase<DiagnosticIDs> {
183public:
184 /// The level of the diagnostic, after it has been through mapping.
185 enum Level : uint8_t { Ignored, Note, Remark, Warning, Error, Fatal };
186
187 // Diagnostic classes.
188 enum Class {
195 CLASS_TRAP = 0x06
196 };
197
200 }
201
203 LLVM_PREFERRED_TYPE(diag::Severity)
204 unsigned DefaultSeverity : 3;
205 LLVM_PREFERRED_TYPE(Class)
206 unsigned DiagClass : 3;
207 LLVM_PREFERRED_TYPE(bool)
208 unsigned ShowInSystemHeader : 1;
209 LLVM_PREFERRED_TYPE(bool)
210 unsigned ShowInSystemMacro : 1;
211 LLVM_PREFERRED_TYPE(bool)
212 unsigned HasGroup : 1;
213 diag::Group Group;
214 std::string Description;
215
216 auto get_as_tuple() const {
217 return std::tuple(DefaultSeverity, DiagClass, ShowInSystemHeader,
218 ShowInSystemMacro, HasGroup, Group,
219 std::string_view{Description});
220 }
221
222 public:
223 CustomDiagDesc(diag::Severity DefaultSeverity, std::string Description,
224 unsigned Class = CLASS_WARNING,
225 bool ShowInSystemHeader = false,
226 bool ShowInSystemMacro = false,
227 std::optional<diag::Group> Group = std::nullopt)
228 : DefaultSeverity(static_cast<unsigned>(DefaultSeverity)),
229 DiagClass(Class), ShowInSystemHeader(ShowInSystemHeader),
230 ShowInSystemMacro(ShowInSystemMacro), HasGroup(Group != std::nullopt),
231 Group(Group.value_or(diag::Group{})),
232 Description(std::move(Description)) {}
233
234 std::optional<diag::Group> GetGroup() const {
235 if (HasGroup)
236 return Group;
237 return std::nullopt;
238 }
239
241 return static_cast<diag::Severity>(DefaultSeverity);
242 }
243
244 Class GetClass() const { return static_cast<Class>(DiagClass); }
245 std::string_view GetDescription() const { return Description; }
246 bool ShouldShowInSystemHeader() const { return ShowInSystemHeader; }
247
248 friend bool operator==(const CustomDiagDesc &lhs,
249 const CustomDiagDesc &rhs) {
250 return lhs.get_as_tuple() == rhs.get_as_tuple();
251 }
252
253 friend bool operator<(const CustomDiagDesc &lhs,
254 const CustomDiagDesc &rhs) {
255 return lhs.get_as_tuple() < rhs.get_as_tuple();
256 }
257 };
258
259 struct GroupInfo {
260 LLVM_PREFERRED_TYPE(diag::Severity)
262 LLVM_PREFERRED_TYPE(bool)
264 };
265
266private:
267 /// Information for uniquing and looking up custom diags.
268 std::unique_ptr<diag::CustomDiagInfo> CustomDiagInfo;
269 std::unique_ptr<GroupInfo[]> GroupInfos = []() {
270 auto GIs = std::make_unique<GroupInfo[]>(
271 static_cast<size_t>(diag::Group::NUM_GROUPS));
272 for (size_t i = 0; i != static_cast<size_t>(diag::Group::NUM_GROUPS); ++i)
273 GIs[i] = {{}, false};
274 return GIs;
275 }();
276
277public:
280
281 // Convenience method to construct a new refcounted DiagnosticIDs.
283 return llvm::makeIntrusiveRefCnt<DiagnosticIDs>();
284 }
285
286 /// Return an ID for a diagnostic with the specified format string and
287 /// level.
288 ///
289 /// If this is the first request for this diagnostic, it is registered and
290 /// created, otherwise the existing ID is returned.
291
292 // FIXME: Replace this function with a create-only facilty like
293 // createCustomDiagIDFromFormatString() to enforce safe usage. At the time of
294 // writing, nearly all callers of this function were invalid.
295 unsigned getCustomDiagID(CustomDiagDesc Diag);
296
297 // FIXME: this API should almost never be used; custom diagnostics do not
298 // have an associated diagnostic group and thus cannot be controlled by users
299 // like other diagnostics. The number of times this API is used in Clang
300 // should only ever be reduced, not increased.
301 // [[deprecated("Use a CustomDiagDesc instead of a Level")]]
302 unsigned getCustomDiagID(Level Level, StringRef Message) {
303 return getCustomDiagID([&]() -> CustomDiagDesc {
304 switch (Level) {
306 return {diag::Severity::Ignored, std::string(Message), CLASS_WARNING,
307 /*ShowInSystemHeader*/ true, /*ShowInSystemMacro=*/true};
309 return {diag::Severity::Fatal, std::string(Message), CLASS_NOTE,
310 /*ShowInSystemHeader*/ true, /*ShowInSystemMacro=*/true};
312 return {diag::Severity::Remark, std::string(Message), CLASS_REMARK,
313 /*ShowInSystemHeader*/ true, /*ShowInSystemMacro=*/true};
315 return {diag::Severity::Warning, std::string(Message), CLASS_WARNING,
316 /*ShowInSystemHeader*/ true, /*ShowInSystemMacro=*/true};
318 return {diag::Severity::Error, std::string(Message), CLASS_ERROR,
319 /*ShowInSystemHeader*/ true, /*ShowInSystemMacro=*/true};
321 return {diag::Severity::Fatal, std::string(Message), CLASS_ERROR,
322 /*ShowInSystemHeader*/ true, /*ShowInSystemMacro=*/true};
323 }
324 llvm_unreachable("Fully covered switch above!");
325 }());
326 }
327
328 //===--------------------------------------------------------------------===//
329 // Diagnostic classification and reporting interfaces.
330 //
331
332 /// Given a diagnostic ID, return a description of the issue.
333 StringRef getDescription(unsigned DiagID) const;
334
335 /// Return true if the unmapped diagnostic levelof the specified
336 /// diagnostic ID is a Warning or Extension.
337 ///
338 /// This is not legal to call on NOTEs.
339 bool isWarningOrExtension(unsigned DiagID) const;
340
341 /// Return true if the specified diagnostic is mapped to errors by
342 /// default.
343 bool isDefaultMappingAsError(unsigned DiagID) const;
344
345 /// Get the default mapping for this diagnostic.
346 DiagnosticMapping getDefaultMapping(unsigned DiagID) const;
347
348 void initCustomDiagMapping(DiagnosticMapping &, unsigned DiagID);
349
350 /// Determine whether the given diagnostic ID is a Note.
351 bool isNote(unsigned DiagID) const;
352
353 /// Determine whether the given diagnostic ID is for an
354 /// extension of some sort.
355 bool isExtensionDiag(unsigned DiagID) const {
356 bool ignored;
357 return isExtensionDiag(DiagID, ignored);
358 }
359
360 /// Determine whether the given diagnostic ID is for an
361 /// extension of some sort, and whether it is enabled by default.
362 ///
363 /// This also returns EnabledByDefault, which is set to indicate whether the
364 /// diagnostic is ignored by default (in which case -pedantic enables it) or
365 /// treated as a warning/error by default.
366 ///
367 bool isExtensionDiag(unsigned DiagID, bool &EnabledByDefault) const;
368
369 bool isTrapDiag(unsigned DiagID) const {
370 return getDiagClass(DiagID) == CLASS_TRAP;
371 }
372
373 /// Given a group ID, returns the flag that toggles the group.
374 /// For example, for Group::DeprecatedDeclarations, returns
375 /// "deprecated-declarations".
376 static StringRef getWarningOptionForGroup(diag::Group);
377
378 /// Given a diagnostic group ID, return its documentation.
379 static StringRef getWarningOptionDocumentation(diag::Group GroupID);
380
381 void setGroupSeverity(StringRef Group, diag::Severity);
382 void setGroupNoWarningsAsError(StringRef Group, bool);
383
384 /// Given a group ID, returns the flag that toggles the group.
385 /// For example, for "deprecated-declarations", returns
386 /// Group::DeprecatedDeclarations.
387 static std::optional<diag::Group> getGroupForWarningOption(StringRef);
388
389 /// Return the lowest-level group that contains the specified diagnostic.
390 std::optional<diag::Group> getGroupForDiag(unsigned DiagID) const;
391
392 /// Return the lowest-level warning option that enables the specified
393 /// diagnostic.
394 ///
395 /// If there is no -Wfoo flag that controls the diagnostic, this returns null.
396 StringRef getWarningOptionForDiag(unsigned DiagID);
397
398 /// Return the category number that a specified \p DiagID belongs to,
399 /// or 0 if no category.
400 static unsigned getCategoryNumberForDiag(unsigned DiagID);
401
402 /// Return the number of diagnostic categories.
403 static unsigned getNumberOfCategories();
404
405 /// Given a category ID, return the name of the category.
406 static StringRef getCategoryNameFromID(unsigned CategoryID);
407
408 /// Return true if a given diagnostic falls into an ARC diagnostic
409 /// category.
410 static bool isARCDiagnostic(unsigned DiagID);
411
412 /// Return true if a given diagnostic is a codegen-time ABI check.
413 static bool isCodegenABICheckDiagnostic(unsigned DiagID);
414
415 /// Enumeration describing how the emission of a diagnostic should
416 /// be treated when it occurs during C++ template argument deduction.
418 /// The diagnostic should not be reported, but it should cause
419 /// template argument deduction to fail.
420 ///
421 /// The vast majority of errors that occur during template argument
422 /// deduction fall into this category.
424
425 /// The diagnostic should be suppressed entirely.
426 ///
427 /// Warnings generally fall into this category.
429
430 /// The diagnostic should be reported.
431 ///
432 /// The diagnostic should be reported. Various fatal errors (e.g.,
433 /// template instantiation depth exceeded) fall into this category.
435
436 /// The diagnostic is an access-control diagnostic, which will be
437 /// substitution failures in some contexts and reported in others.
439 };
440
441 /// Determines whether the given built-in diagnostic ID is
442 /// for an error that is suppressed if it occurs during C++ template
443 /// argument deduction.
444 ///
445 /// When an error is suppressed due to SFINAE, the template argument
446 /// deduction fails but no diagnostic is emitted. Certain classes of
447 /// errors, such as those errors that involve C++ access control,
448 /// are not SFINAE errors.
449 static SFINAEResponse getDiagnosticSFINAEResponse(unsigned DiagID);
450
451 /// Whether the diagnostic message can be deferred.
452 ///
453 /// For single source offloading languages, a diagnostic message occurred
454 /// in a device host function may be deferred until the function is sure
455 /// to be emitted.
456 static bool isDeferrable(unsigned DiagID);
457
458 /// Get the string of all diagnostic flags.
459 ///
460 /// \returns A list of all diagnostics flags as they would be written in a
461 /// command line invocation including their `no-` variants. For example:
462 /// `{"-Wempty-body", "-Wno-empty-body", ...}`
463 static std::vector<std::string> getDiagnosticFlags();
464
465 /// Get the set of all diagnostic IDs in the group with the given name.
466 ///
467 /// \param[out] Diags - On return, the diagnostics in the group.
468 /// \returns \c true if the given group is unknown, \c false otherwise.
469 bool getDiagnosticsInGroup(diag::Flavor Flavor, StringRef Group,
470 SmallVectorImpl<diag::kind> &Diags) const;
471
472 /// Get the set of all diagnostic IDs.
473 static void getAllDiagnostics(diag::Flavor Flavor,
474 std::vector<diag::kind> &Diags);
475
476 /// Get the diagnostic option with the closest edit distance to the
477 /// given group name.
478 static StringRef getNearestOption(diag::Flavor Flavor, StringRef Group);
479
480 /// Get the appropriate diagnostic Id to use for issuing a compatibility
481 /// diagnostic. For use by the various DiagCompat() helpers.
482 static unsigned getCXXCompatDiagId(const LangOptions &LangOpts,
483 unsigned CompatDiagId);
484
485private:
486 /// Classify the specified diagnostic ID into a Level, consumable by
487 /// the DiagnosticClient.
488 ///
489 /// The classification is based on the way the client configured the
490 /// DiagnosticsEngine object.
491 ///
492 /// \param Loc The source location for which we are interested in finding out
493 /// the diagnostic state. Can be null in order to query the latest state.
495 getDiagnosticLevel(unsigned DiagID, SourceLocation Loc,
496 const DiagnosticsEngine &Diag) const LLVM_READONLY;
497
499 getDiagnosticSeverity(unsigned DiagID, SourceLocation Loc,
500 const DiagnosticsEngine &Diag) const LLVM_READONLY;
501
502 Class getDiagClass(unsigned DiagID) const;
503
504 /// Whether the diagnostic may leave the AST in a state where some
505 /// invariants can break.
506 bool isUnrecoverable(unsigned DiagID) const;
507
508 friend class DiagnosticsEngine;
509};
510
511} // end namespace clang
512
513#endif
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
SourceLocation Loc
Definition: SemaObjC.cpp:754
Class to make it convenient to initialize TrapReason objects which can be used to attach the "trap re...
friend bool operator==(const CustomDiagDesc &lhs, const CustomDiagDesc &rhs)
friend bool operator<(const CustomDiagDesc &lhs, const CustomDiagDesc &rhs)
std::optional< diag::Group > GetGroup() const
diag::Severity GetDefaultSeverity() const
CustomDiagDesc(diag::Severity DefaultSeverity, std::string Description, unsigned Class=CLASS_WARNING, bool ShowInSystemHeader=false, bool ShowInSystemMacro=false, std::optional< diag::Group > Group=std::nullopt)
std::string_view GetDescription() const
Used for handling and querying diagnostic IDs.
void initCustomDiagMapping(DiagnosticMapping &, unsigned DiagID)
static StringRef getCategoryNameFromID(unsigned CategoryID)
Given a category ID, return the name of the category.
unsigned getCustomDiagID(Level Level, StringRef Message)
static unsigned getNumberOfCategories()
Return the number of diagnostic categories.
static StringRef getNearestOption(diag::Flavor Flavor, StringRef Group)
Get the diagnostic option with the closest edit distance to the given group name.
bool getDiagnosticsInGroup(diag::Flavor Flavor, StringRef Group, SmallVectorImpl< diag::kind > &Diags) const
Get the set of all diagnostic IDs in the group with the given name.
static std::vector< std::string > getDiagnosticFlags()
Get the string of all diagnostic flags.
bool isWarningOrExtension(unsigned DiagID) const
Return true if the unmapped diagnostic levelof the specified diagnostic ID is a Warning or Extension.
void setGroupSeverity(StringRef Group, diag::Severity)
bool isExtensionDiag(unsigned DiagID) const
Determine whether the given diagnostic ID is for an extension of some sort.
static unsigned getCXXCompatDiagId(const LangOptions &LangOpts, unsigned CompatDiagId)
Get the appropriate diagnostic Id to use for issuing a compatibility diagnostic.
DiagnosticMapping getDefaultMapping(unsigned DiagID) const
Get the default mapping for this diagnostic.
static SFINAEResponse getDiagnosticSFINAEResponse(unsigned DiagID)
Determines whether the given built-in diagnostic ID is for an error that is suppressed if it occurs d...
bool isDefaultMappingAsError(unsigned DiagID) const
Return true if the specified diagnostic is mapped to errors by default.
void setGroupNoWarningsAsError(StringRef Group, bool)
bool isTrapDiag(unsigned DiagID) const
static bool isCodegenABICheckDiagnostic(unsigned DiagID)
Return true if a given diagnostic is a codegen-time ABI check.
StringRef getDescription(unsigned DiagID) const
Given a diagnostic ID, return a description of the issue.
SFINAEResponse
Enumeration describing how the emission of a diagnostic should be treated when it occurs during C++ t...
@ SFINAE_SubstitutionFailure
The diagnostic should not be reported, but it should cause template argument deduction to fail.
@ SFINAE_Suppress
The diagnostic should be suppressed entirely.
@ SFINAE_AccessControl
The diagnostic is an access-control diagnostic, which will be substitution failures in some contexts ...
@ SFINAE_Report
The diagnostic should be reported.
bool isNote(unsigned DiagID) const
Determine whether the given diagnostic ID is a Note.
StringRef getWarningOptionForDiag(unsigned DiagID)
Return the lowest-level warning option that enables the specified diagnostic.
static StringRef getWarningOptionDocumentation(diag::Group GroupID)
Given a diagnostic group ID, return its documentation.
static std::optional< diag::Group > getGroupForWarningOption(StringRef)
Given a group ID, returns the flag that toggles the group.
static bool IsCustomDiag(diag::kind Diag)
unsigned getCustomDiagID(CustomDiagDesc Diag)
Return an ID for a diagnostic with the specified format string and level.
Level
The level of the diagnostic, after it has been through mapping.
static unsigned getCategoryNumberForDiag(unsigned DiagID)
Return the category number that a specified DiagID belongs to, or 0 if no category.
static StringRef getWarningOptionForGroup(diag::Group)
Given a group ID, returns the flag that toggles the group.
static bool isARCDiagnostic(unsigned DiagID)
Return true if a given diagnostic falls into an ARC diagnostic category.
static void getAllDiagnostics(diag::Flavor Flavor, std::vector< diag::kind > &Diags)
Get the set of all diagnostic IDs.
std::optional< diag::Group > getGroupForDiag(unsigned DiagID) const
Return the lowest-level group that contains the specified diagnostic.
static llvm::IntrusiveRefCntPtr< DiagnosticIDs > create()
static bool isDeferrable(unsigned DiagID)
Whether the diagnostic message can be deferred.
bool hasNoErrorAsFatal() const
bool wasUpgradedFromWarning() const
Whether this mapping attempted to map the diagnostic to a warning, but was overruled because the diag...
unsigned serialize() const
Serialize this mapping as a raw integer.
bool operator==(DiagnosticMapping Other) const
void setNoWarningAsError(bool Value)
void setSeverity(diag::Severity Value)
static DiagnosticMapping deserialize(unsigned Bits)
Deserialize a mapping.
diag::Severity getSeverity() const
void setUpgradedFromWarning(bool Value)
static DiagnosticMapping Make(diag::Severity Severity, bool IsUser, bool IsPragma)
void setNoErrorAsFatal(bool Value)
bool hasNoWarningAsError() const
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:231
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:434
Encodes a location in the source.
@ DIAG_SIZE_INSTALLAPI
Definition: DiagnosticIDs.h:49
@ DIAG_SIZE_SERIALIZATION
Definition: DiagnosticIDs.h:40
@ DIAG_SIZE_REFACTORING
Definition: DiagnosticIDs.h:48
Flavor
Flavors of diagnostics we can emit.
Definition: DiagnosticIDs.h:93
@ WarningOrError
A diagnostic that indicates a problem or potential problem.
@ DIAG_START_INSTALLAPI
Definition: DiagnosticIDs.h:67
@ DIAG_START_SERIALIZATION
Definition: DiagnosticIDs.h:58
@ DIAG_START_REFACTORING
Definition: DiagnosticIDs.h:66
unsigned kind
All of the diagnostics that can be emitted by the frontend.
Definition: DiagnosticIDs.h:76
Severity
Enum values that allow the client to map NOTEs, WARNINGs, and EXTENSIONs to either Ignore (nothing),...
Definition: DiagnosticIDs.h:82
@ Warning
Present this diagnostic as a warning.
@ Fatal
Present this diagnostic as a fatal error.
@ Error
Present this diagnostic as an error.
@ Remark
Present this diagnostic as a remark.
@ Ignored
Do not present this diagnostic, ignore it.
The JSON file list parser is used to communicate input to InstallAPI.
@ Result
The result type of a method or function.
@ Other
Other implicit parameter.