FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
codeql/cpp/ql/lib/semmle/code/cpp/Diagnostics.qll at codeql-cli/v2.27.1 · github/codeql · GitHub
github
codeql
Repository navigation
Code
Issues
1k
(1k)
Pull requests
485
(485)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
codeql
/
cpp
/
ql
/
lib
/
semmle
/
code
/
cpp
/
Diagnostics.qll
Copy path
More file actions
More file actions
Latest commit
History
History
History
68 lines (54 loc) · 2.19 KB
Breadcrumbs
codeql
/
cpp
/
ql
/
lib
/
semmle
/
code
/
cpp
/
Diagnostics.qll
Copy path
File metadata and controls
68 lines (54 loc) · 2.19 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
63
64
65
66
67
68
/**
* Provides classes representing warnings generated during compilation.
*/
import
semmle.code.cpp.Location
/** A compiler-generated error, warning or remark. */
class
Diagnostic
extends
Locatable
,
@diagnostic
{
/** Gets the compilation that generated this diagnostic. */
Compilation
getCompilation
(
)
{
diagnostic_for
(
underlyingElement
(
this
)
,
result
,
_
,
_
)
}
/**
* Gets the severity of the message, on a range from 1 to 5: 1=remark,
* 2=warning, 3=discretionary error, 4=error, 5=catastrophic error.
*/
int
getSeverity
(
)
{
diagnostics
(
underlyingElement
(
this
)
,
result
,
_
,
_
,
_
,
_
)
}
/** Gets the error code for this compiler message. */
string
getTag
(
)
{
diagnostics
(
underlyingElement
(
this
)
,
_
,
result
,
_
,
_
,
_
)
}
/** Holds if `s` is the error code for this compiler message. */
predicate
hasTag
(
string
s
)
{
this
.
getTag
(
)
=
s
}
/**
* Gets the error message text associated with this compiler
* diagnostic.
*/
string
getMessage
(
)
{
diagnostics
(
underlyingElement
(
this
)
,
_
,
_
,
result
,
_
,
_
)
}
/**
* Gets the full error message text associated with this compiler
* diagnostic.
*/
string
getFullMessage
(
)
{
diagnostics
(
underlyingElement
(
this
)
,
_
,
_
,
_
,
result
,
_
)
}
/** Gets the source location corresponding to the compiler message. */
override
Location
getLocation
(
)
{
diagnostics
(
underlyingElement
(
this
)
,
_
,
_
,
_
,
_
,
result
)
}
override
string
toString
(
)
{
result
=
this
.
getMessage
(
)
}
}
/** A compiler-generated remark (milder than a warning). */
class
CompilerRemark
extends
Diagnostic
{
CompilerRemark
(
)
{
this
.
getSeverity
(
)
=
1
}
}
/** A compiler-generated warning. */
class
CompilerWarning
extends
Diagnostic
{
CompilerWarning
(
)
{
this
.
getSeverity
(
)
=
2
}
}
/**
* A compiler-generated discretionary error (a compile-time error that may
* be suppressed).
*/
class
CompilerDiscretionaryError
extends
Diagnostic
{
CompilerDiscretionaryError
(
)
{
this
.
getSeverity
(
)
=
3
}
}
/** A compiler error message. */
class
CompilerError
extends
Diagnostic
{
CompilerError
(
)
{
this
.
getSeverity
(
)
=
4
}
}
/** A compiler error that prevents compilation from continuing. */
class
CompilerCatastrophe
extends
Diagnostic
{
CompilerCatastrophe
(
)
{
this
.
getSeverity
(
)
=
5
}
}
Back
|
FazBrowse Home
|
New Git URL