File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
#include " swift/extractor/invocation/CodeQLDiagnosticsConsumer.h"
2
2
#include " swift/extractor/trap/TrapDomain.h"
3
3
#include " swift/extractor/trap/generated/TrapEntries.h"
4
+ #include " swift/extractor/trap/generated/TrapClasses.h"
4
5
5
6
#include < swift/AST/DiagnosticEngine.h>
6
7
#include < swift/Basic/SourceManager.h>
@@ -48,13 +49,13 @@ static void attachLocation(TrapDomain& trap,
48
49
return ;
49
50
}
50
51
auto filepath = getFilePath (sourceManager.getDisplayNameForLoc (loc));
51
- FilesTrap file;
52
- file.id = trap.createLabel <FileTag >();
52
+ DbFile file ({}) ;
53
+ file.id = trap.createLabel <DbFileTag >();
53
54
file.name = filepath;
54
55
trap.emit (file);
55
56
56
- LocationsTrap location;
57
- location.id = trap.createLabel <LocationTag >();
57
+ DbLocation location ({}) ;
58
+ location.id = trap.createLabel <DbLocationTag >();
58
59
location.file = file.id ;
59
60
std::tie (location.start_line , location.start_column ) =
60
61
sourceManager.getLineAndColumnInBuffer (loc);
Original file line number Diff line number Diff line change 1
- | file://:0:0:0:0 | Diagnostics | getText: | Hello, warning | getKind: | 2 |
1
+ | diags.swift:1:10:1:10 | Diagnostics | getText: | Hello, warning | getKind: | 2 |
You can’t perform that action at this time.
0 commit comments