Swift: Extract structured keypath components.

Changes in swift/ql/lib are generated by swift/codegen without manual intervention.
This commit is contained in:
Alexandre Boulgakov
2023-04-06 18:26:14 +01:00
parent 2b1dea56b5
commit 35a2d55d18
40 changed files with 821 additions and 34 deletions

View File

@@ -2,6 +2,7 @@
#include <swift/AST/ASTAllocated.h>
#include <swift/AST/AvailabilitySpec.h>
#include <swift/AST/Expr.h>
#include <swift/AST/SourceFile.h>
#include <swift/Basic/SourceManager.h>
#include <unordered_map>
@@ -74,6 +75,10 @@ class SwiftLocationExtractor {
swift::Token& token,
TrapLabel<LocatableTag> locatableLabel);
void attachLocation(const swift::SourceManager& sourceManager,
const swift::KeyPathExpr::Component* component,
TrapLabel<LocatableTag> locatableLabel);
private:
TrapLabel<FileTag> fetchFileLabel(const std::filesystem::path& file);
TrapDomain& trap;