forked from shader-slang/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
slang-misc-diagnostic-defs.h
62 lines (54 loc) · 1.75 KB
/
slang-misc-diagnostic-defs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// The file is meant to be included multiple times, to produce different
// pieces of declaration/definition code related to diagnostic messages
//
// Each diagnostic is declared here with:
//
// DIAGNOSTIC(id, severity, name, messageFormat)
//
// Where `id` is the unique diagnostic ID, `severity` is the default
// severity (from the `Severity` enum), `name` is a name used to refer
// to this diagnostic from code, and `messageFormat` is the default
// (non-localized) message for the diagnostic, with placeholders
// for any arguments.
#ifndef DIAGNOSTIC
#error Need to #define DIAGNOSTIC(...) before including
#define DIAGNOSTIC(id, severity, name, messageFormat) /* */
#endif
//
// -1 - Notes that decorate another diagnostic.
//
DIAGNOSTIC(-1, Note, seeTokenPasteLocation, "see token pasted location")
DIAGNOSTIC(
100000,
Error,
downstreamNameNotKnown,
"downstream tool name not known, allowed names are $0")
DIAGNOSTIC(
100001,
Error,
expectedArgumentForOption,
"expected an argument for command-line option '$0'")
DIAGNOSTIC(100002, Error, unbalancedDownstreamArguments, "unbalanced downstream arguments")
DIAGNOSTIC(
100003,
Error,
closeOfUnopenDownstreamArgs,
"close of an unopen downstream argument scope")
DIAGNOSTIC(100004, Error, downstreamToolNameNotDefined, "downstream tool name not defined")
DIAGNOSTIC(
100005,
Error,
invalidArgumentForOption,
"invalid argument format for command-line option '$0'")
DIAGNOSTIC(
99999,
Note,
noteLocationOfInternalError,
"an internal error threw an exception while working on code near this location")
DIAGNOSTIC(
29104,
Error,
spirvCoreGrammarJSONParseFailure,
"unexpected JSON in spirv core grammar file: $0")
#undef DIAGNOSTIC