mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: Extract structured keypath components.
Changes in swift/ql/lib are generated by swift/codegen without manual intervention.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user