Swift: add diagnostics test case

This commit is contained in:
Alex Denisov
2022-11-03 13:23:11 +01:00
parent b39cf7ea11
commit 288bdc2ee9
4 changed files with 10 additions and 4 deletions

View File

@@ -0,0 +1 @@
| file://:0:0:0:0 | Diagnostics | getText: | Hello, warning | getKind: | 2 |

View File

@@ -0,0 +1,8 @@
import codeql.swift.elements
import TestUtils
from Diagnostics x, string getText, int getKind
where
getText = x.getText() and
getKind = x.getKind()
select x, "getText:", getText, "getKind:", getKind

View File

@@ -0,0 +1 @@
#warning("Hello, warning")

View File

@@ -1,4 +0,0 @@
// generated by codegen/codegen.py
After a swift source file is added in this directory and codegen/codegen.py is run again, test queries
will appear and this file will be deleted