reapply #131804 and #159289 Fixed cmake link issue. --------- Co-authored-by: DeNiCoN <denicon1234@gmail.com> Co-authored-by: Baranov Victor <bar.victor.2002@gmail.com>
22 lines
576 B
YAML
22 lines
576 B
YAML
CustomChecks:
|
|
- Name: test-diag-level
|
|
Query: |
|
|
match varDecl(
|
|
hasType(asString("long")),
|
|
hasTypeLoc(typeLoc().bind("long"))
|
|
).bind("decl")
|
|
Diagnostic:
|
|
- BindName: long
|
|
Message: use 'int' instead of 'long'
|
|
Level: Warning
|
|
- BindName: decl
|
|
Message: declaration of 'long'
|
|
Level: Note
|
|
- Name: test-let-bind
|
|
Query: |
|
|
let expr varDecl(isStaticStorageClass()).bind("vd")
|
|
match expr
|
|
Diagnostic:
|
|
- BindName: vd
|
|
Message: find static variable
|
|
Level: Warning
|