Merge pull request #20446 from github/jketema/swift-6.2

Swift: Make extractor compile with Swift 6.2
This commit is contained in:
Jeroen Ketema
2025-10-27 12:24:16 +01:00
committed by GitHub
89 changed files with 12057 additions and 643 deletions

View File

@@ -0,0 +1,16 @@
class AvailabilitySpec extends @availability_spec {
string toString() { none() }
}
query predicate new_other_availability_specs(AvailabilitySpec id) {
availability_specs(id) and
availability_spec_is_wildcard(id)
}
query predicate new_platform_version_availability_specs(
AvailabilitySpec id, string platform, string version
) {
availability_specs(id) and
availability_spec_platforms(id, platform) and
availability_spec_versions(id, version)
}

View File

@@ -0,0 +1,57 @@
class KeyPathComponent extends @key_path_component {
string toString() { none() }
}
class Element extends @element {
string toString() { none() }
}
class ArgumentOrNone extends @argument_or_none {
string toString() { none() }
}
class TypeOrNone extends @type_or_none {
string toString() { none() }
}
class ValueDeclOrNone extends @value_decl_or_none {
string toString() { none() }
}
predicate isKeyPathComponentWithNewKind(KeyPathComponent id) {
key_path_components(id, 3, _) or key_path_components(id, 4, _)
}
query predicate new_key_path_components(KeyPathComponent id, int kind, TypeOrNone component_type) {
exists(int old_kind |
key_path_components(id, old_kind, component_type) and
not isKeyPathComponentWithNewKind(id) and
if old_kind < 5 then kind = old_kind else kind = old_kind - 2
)
}
query predicate new_key_path_component_subscript_arguments(
KeyPathComponent id, int index, ArgumentOrNone subscript_argument
) {
key_path_component_subscript_arguments(id, index, subscript_argument) and
not isKeyPathComponentWithNewKind(id)
}
query predicate new_key_path_component_tuple_indices(KeyPathComponent id, int tuple_index) {
key_path_component_tuple_indices(id, tuple_index) and
not isKeyPathComponentWithNewKind(id)
}
query predicate new_key_path_component_decl_refs(KeyPathComponent id, ValueDeclOrNone decl_ref) {
key_path_component_decl_refs(id, decl_ref) and
not isKeyPathComponentWithNewKind(id)
}
query predicate new_unspecified_elements(Element id, string property, string error) {
unspecified_elements(id, property, error)
or
isKeyPathComponentWithNewKind(id) and
property = "" and
error =
"UnresolvedApply and Apply KeyPathComponents removed during database downgrade. Please update your CodeQL."
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
class ExistentialArchetypeType extends @existential_archetype_type {
string toString() { none() }
}
from ExistentialArchetypeType id
where existential_archetype_types(id)
select id

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
description: Upgrade to Swift 6.2
compatibility: partial
availability_specs.rel: delete
availability_spec_platforms.rel: delete
availability_spec_versions.rel: delete
availability_spec_is_wildcard.rel: delete
other_availability_specs.rel: run availability_specs.qlo new_other_availability_specs
platform_version_availability_specs.rel: run availability_specs.qlo new_platform_version_availability_specs
existential_archetype_types.rel: delete
opened_archetype_types.rel: run opened_archetype_types.qlo
key_path_components.rel: run key_path_components.qlo new_key_path_components
key_path_component_subscript_arguments.rel: run key_path_components.qlo new_key_path_component_subscript_arguments
key_path_component_tuple_indices.rel: run key_path_components.qlo new_key_path_component_tuple_indices
key_path_component_decl_refs.rel: run key_path_components.qlo new_key_path_component_decl_refs
unspecified_elements.rel: run key_path_components.qlo new_unspecified_elements

View File

@@ -170,7 +170,7 @@ static std::unordered_set<swift::ModuleDecl*> extractDeclarations(
bodyEmissionStrategy);
auto topLevelDecls = getTopLevelDecls(module, primaryFile, lazyDeclaration);
for (auto decl : topLevelDecls) {
if (swift::AvailableAttr::isUnavailable(decl)) {
if (decl->isUnavailable() && !llvm::isa<swift::NominalTypeDecl>(decl)) {
continue;
}
visitor.extract(decl);

View File

@@ -12,8 +12,7 @@ using namespace codeql;
// same module one by one. In this mode, we restrict emission only to the same file ignoring
// all the other files.
bool SwiftBodyEmissionStrategy::shouldEmitDeclBody(const swift::Decl& decl) {
auto module = decl.getModuleContext();
if (module != &currentModule) {
if (!currentTopLevelDecls.contains(&decl) && decl.getModuleContext() != &currentModule) {
return false;
}
if (currentLazyDeclaration && currentLazyDeclaration != &decl) {

View File

@@ -12,13 +12,19 @@ class SwiftBodyEmissionStrategy {
const swift::Decl* currentLazyDeclaration)
: currentModule(currentModule),
currentPrimarySourceFile(currentPrimarySourceFile),
currentLazyDeclaration(currentLazyDeclaration) {}
currentLazyDeclaration(currentLazyDeclaration) {
llvm::SmallVector<swift::Decl*> decls;
currentModule.getTopLevelDecls(decls);
currentTopLevelDecls.insert(decls.begin(), decls.end());
}
bool shouldEmitDeclBody(const swift::Decl& decl);
private:
swift::ModuleDecl& currentModule;
swift::SourceFile* currentPrimarySourceFile;
const swift::Decl* currentLazyDeclaration;
std::unordered_set<const swift::Decl*> currentTopLevelDecls;
};
} // namespace codeql

View File

@@ -29,7 +29,14 @@ void SwiftLocationExtractor::attachLocationImpl(const swift::SourceManager& sour
entry.file = fetchFileLabel(file);
std::tie(entry.start_line, entry.start_column) =
sourceManager.getLineAndColumnInBuffer(range.Start);
std::tie(entry.end_line, entry.end_column) = sourceManager.getLineAndColumnInBuffer(range.End);
if (sourceManager.getLineAndColumnInBuffer(range.End) >=
sourceManager.getLineAndColumnInBuffer(range.Start)) {
std::tie(entry.end_line, entry.end_column) = sourceManager.getLineAndColumnInBuffer(range.End);
} else {
// the compiler may generate source ranges that go backwards
entry.end_line = entry.start_line;
entry.end_column = entry.start_column;
}
SwiftMangledName locName{"loc", entry.file, ':', entry.start_line, ':', entry.start_column,
':', entry.end_line, ':', entry.end_column};
entry.id = trap.createTypedLabel<DbLocationTag>(locName);

View File

@@ -102,8 +102,9 @@ MAP(swift::Expr, ExprTag)
MAP(swift::IdentityExpr, IdentityExprTag)
MAP(swift::ParenExpr, ParenExprTag)
MAP(swift::DotSelfExpr, DotSelfExprTag)
MAP(swift::BorrowExpr, BorrowExprTag)
MAP(swift::AwaitExpr, AwaitExprTag)
MAP(swift::UnsafeExpr, void) // TODO: Swift 6.2
MAP(swift::BorrowExpr, BorrowExprTag)
MAP(swift::UnresolvedMemberChainResultExpr, UnresolvedMemberChainResultExprTag)
MAP(swift::AnyTryExpr, AnyTryExprTag)
MAP(swift::TryExpr, TryExprTag)
@@ -195,7 +196,6 @@ MAP(swift::Expr, ExprTag)
MAP(swift::ObjCSelectorExpr, ObjCSelectorExprTag)
MAP(swift::KeyPathExpr, KeyPathExprTag)
MAP(swift::KeyPathDotExpr, KeyPathDotExprTag)
MAP(swift::OneWayExpr, OneWayExprTag)
MAP(swift::TapExpr, TapExprTag)
MAP(swift::TypeJoinExpr, void) // does not appear in a visible AST, skipping
MAP(swift::MacroExpansionExpr, void) // unexpanded macro in an expr context, skipping
@@ -237,11 +237,11 @@ MAP(swift::Decl, DeclTag)
MAP(swift::ExtensionDecl, ExtensionDeclTag)
MAP(swift::TopLevelCodeDecl, TopLevelCodeDeclTag)
MAP(swift::ImportDecl, ImportDeclTag)
MAP(swift::PoundDiagnosticDecl, PoundDiagnosticDeclTag)
MAP(swift::PrecedenceGroupDecl, PrecedenceGroupDeclTag)
MAP(swift::MissingMemberDecl, MissingMemberDeclTag)
MAP(swift::PatternBindingDecl, PatternBindingDeclTag)
MAP(swift::EnumCaseDecl, EnumCaseDeclTag)
MAP(swift::UsingDecl, void) // TODO: Swift 6.2
MAP(swift::OperatorDecl, OperatorDeclTag)
MAP(swift::InfixOperatorDecl, InfixOperatorDeclTag)
MAP(swift::PrefixOperatorDecl, PrefixOperatorDeclTag)
@@ -315,7 +315,7 @@ MAP(swift::TypeBase, TypeTag)
MAP(swift::PrimaryArchetypeType, PrimaryArchetypeTypeTag)
MAP(swift::OpaqueTypeArchetypeType, OpaqueTypeArchetypeTypeTag)
MAP(swift::LocalArchetypeType, LocalArchetypeTypeTag)
MAP(swift::OpenedArchetypeType, OpenedArchetypeTypeTag)
MAP(swift::ExistentialArchetypeType, ExistentialArchetypeTypeTag)
MAP(swift::ElementArchetypeType, ElementArchetypeTypeTag)
MAP(swift::PackArchetypeType, PackArchetypeTypeTag)
MAP(swift::GenericTypeParamType, GenericTypeParamTypeTag)
@@ -342,16 +342,16 @@ MAP(swift::TypeBase, TypeTag)
MAP(swift::IntegerType, IntegerTypeTag)
MAP(swift::SugarType, SugarTypeTag)
MAP(swift::TypeAliasType, TypeAliasTypeTag)
MAP(swift::LocatableType, void) // TODO: Swift 6.2
MAP(swift::SyntaxSugarType, SyntaxSugarTypeTag)
MAP(swift::UnarySyntaxSugarType, UnarySyntaxSugarTypeTag)
MAP(swift::ArraySliceType, ArraySliceTypeTag)
MAP(swift::OptionalType, OptionalTypeTag)
MAP(swift::VariadicSequenceType, VariadicSequenceTypeTag)
MAP(swift::InlineArrayType, void) // TODO: Swift 6.2
MAP(swift::DictionaryType, DictionaryTypeTag)
MAP(swift::AvailabilitySpec, AvailabilitySpecTag)
MAP(swift::PlatformVersionConstraintAvailabilitySpec, PlatformVersionAvailabilitySpecTag)
MAP(swift::OtherPlatformAvailabilitySpec, OtherAvailabilitySpecTag)
MAP(swift::PoundAvailableInfo, AvailabilityInfoTag)
MAP(swift::MacroRoleAttr, MacroRoleTag)

View File

@@ -8,6 +8,8 @@
#include <swift/AST/ASTContext.h>
#include <swift/AST/GenericEnvironment.h>
#include <swift/AST/GenericParamList.h>
#include <swift/AST/ClangModuleLoader.h>
#include <clang/Basic/Module.h>
using namespace codeql;
@@ -38,6 +40,9 @@ std::string_view getTypeKindStr(const swift::TypeBase* type) {
} // namespace
std::unordered_map<const swift::Decl*, SwiftMangler::ExtensionIndex>
SwiftMangler::preloadedExtensionIndexes;
SwiftMangledName SwiftMangler::initMangled(const swift::TypeBase* type) {
return {getTypeKindStr(type), '_'};
}
@@ -100,41 +105,67 @@ SwiftMangledName SwiftMangler::visitExtensionDecl(const swift::ExtensionDecl* de
auto parent = getParent(decl);
auto target = decl->getExtendedType();
return initMangled(decl) << fetch(target) << getExtensionIndex(decl, parent);
auto index = getExtensionIndex(decl, parent);
return initMangled(decl) << fetch(target) << index.index
<< (index.kind == ExtensionKind::clang ? "_clang" : "");
}
unsigned SwiftMangler::getExtensionIndex(const swift::ExtensionDecl* decl,
const swift::Decl* parent) {
SwiftMangler::ExtensionIndex SwiftMangler::getExtensionIndex(const swift::ExtensionDecl* decl,
const swift::Decl* parent) {
// to avoid iterating multiple times on the parent of multiple extensions, we preload extension
// indexes once for each encountered parent into the `preloadedExtensionIndexes` mapping.
// Because we mangle declarations only once in a given trap/dispatcher context, we can safely
// discard preloaded indexes on use
if (auto found = preloadedExtensionIndexes.extract(decl)) {
return found.mapped();
if (auto found = SwiftMangler::preloadedExtensionIndexes.find(decl);
found != SwiftMangler::preloadedExtensionIndexes.end()) {
return found->second;
}
if (auto parentModule = llvm::dyn_cast<swift::ModuleDecl>(parent)) {
llvm::SmallVector<swift::Decl*> siblings;
parentModule->getTopLevelDecls(siblings);
indexExtensions(siblings);
if (auto clangModule = parentModule->findUnderlyingClangModule()) {
indexClangExtensions(clangModule, decl->getASTContext().getClangModuleLoader());
}
} else if (auto iterableParent = llvm::dyn_cast<swift::IterableDeclContext>(parent)) {
indexExtensions(iterableParent->getAllMembers());
} else {
// TODO use a generic logging handle for Swift entities here, once it's available
CODEQL_ASSERT(false, "non-local context must be module or iterable decl context");
}
auto found = preloadedExtensionIndexes.extract(decl);
auto found = SwiftMangler::preloadedExtensionIndexes.find(decl);
// TODO use a generic logging handle for Swift entities here, once it's available
CODEQL_ASSERT(found, "extension not found within parent");
return found.mapped();
CODEQL_ASSERT(found != SwiftMangler::preloadedExtensionIndexes.end(),
"extension not found within parent");
return found->second;
}
void SwiftMangler::indexExtensions(llvm::ArrayRef<swift::Decl*> siblings) {
auto index = 0u;
for (auto sibling : siblings) {
if (sibling->getKind() == swift::DeclKind::Extension) {
preloadedExtensionIndexes.emplace(sibling, index);
SwiftMangler::preloadedExtensionIndexes.try_emplace(sibling, ExtensionKind::swift, index);
index++;
}
}
}
void SwiftMangler::indexClangExtensions(const clang::Module* clangModule,
swift::ClangModuleLoader* moduleLoader) {
if (!moduleLoader) {
return;
}
auto index = 0u;
for (const auto& submodule : clangModule->submodules()) {
if (auto* swiftSubmodule = moduleLoader->getWrapperForModule(submodule)) {
llvm::SmallVector<swift::Decl*> children;
swiftSubmodule->getTopLevelDecls(children);
for (const auto child : children) {
if (child->getKind() == swift::DeclKind::Extension) {
SwiftMangler::preloadedExtensionIndexes.try_emplace(child, ExtensionKind::clang, index);
index++;
}
}
}
++index;
}
}
@@ -215,8 +246,8 @@ SwiftMangledName SwiftMangler::visitAnyFunctionType(const swift::AnyFunctionType
if (flags.isSending()) {
ret << "_sending";
}
if (flags.isCompileTimeConst()) {
ret << "_compiletimeconst";
if (flags.isCompileTimeLiteral()) {
ret << "_compiletimeliteral";
}
if (flags.isNoDerivative()) {
ret << "_noderivative";
@@ -225,6 +256,40 @@ SwiftMangledName SwiftMangler::visitAnyFunctionType(const swift::AnyFunctionType
ret << "...";
}
}
if (type->hasLifetimeDependencies()) {
for (const auto& lifetime : type->getLifetimeDependencies()) {
auto addressable = lifetime.getAddressableIndices();
auto condAddressable = lifetime.getConditionallyAddressableIndices();
ret << "_lifetime";
auto addIndexes = [&](swift::IndexSubset* bitvector) {
for (unsigned i = 0; i < bitvector->getCapacity(); ++i) {
if (bitvector->contains(i)) {
if (addressable && addressable->contains(i)) {
ret << "_address";
} else if (condAddressable && condAddressable->contains(i)) {
ret << "_address_for_deps";
}
ret << "_" << i;
}
}
};
if (lifetime.hasInheritLifetimeParamIndices()) {
ret << "_copy";
addIndexes(lifetime.getInheritIndices());
}
if (lifetime.hasScopeLifetimeParamIndices()) {
ret << "_borrow";
addIndexes(lifetime.getScopeIndices());
}
if (lifetime.isImmortal()) {
ret << "_immortal";
}
}
}
ret << "->" << fetch(type->getResult());
if (type->isAsync()) {
ret << "_async";
@@ -361,7 +426,8 @@ SwiftMangledName SwiftMangler::visitOpaqueTypeArchetypeType(
return visitArchetypeType(type) << fetch(type->getDecl());
}
SwiftMangledName SwiftMangler::visitOpenedArchetypeType(const swift::OpenedArchetypeType* type) {
SwiftMangledName SwiftMangler::visitExistentialArchetypeType(
const swift::ExistentialArchetypeType* type) {
auto* env = type->getGenericEnvironment();
llvm::SmallVector<char> uuid;
env->getOpenedExistentialUUID().toString(uuid);

View File

@@ -93,7 +93,7 @@ class SwiftMangler : private swift::TypeVisitor<SwiftMangler, SwiftMangledName>,
SwiftMangledName visitTypeAliasType(const swift::TypeAliasType* type);
SwiftMangledName visitArchetypeType(const swift::ArchetypeType* type);
SwiftMangledName visitOpaqueTypeArchetypeType(const swift::OpaqueTypeArchetypeType* type);
SwiftMangledName visitOpenedArchetypeType(const swift::OpenedArchetypeType* type);
SwiftMangledName visitExistentialArchetypeType(const swift::ExistentialArchetypeType* type);
SwiftMangledName visitProtocolCompositionType(const swift::ProtocolCompositionType* type);
SwiftMangledName visitLValueType(const swift::LValueType* type);
SwiftMangledName visitDynamicSelfType(const swift::DynamicSelfType* type);
@@ -106,14 +106,26 @@ class SwiftMangler : private swift::TypeVisitor<SwiftMangler, SwiftMangledName>,
SwiftMangledName visitPackExpansionType(const swift::PackExpansionType* type);
private:
std::unordered_map<const swift::Decl*, unsigned> preloadedExtensionIndexes;
enum class ExtensionKind : bool {
swift,
clang,
};
struct ExtensionIndex {
const ExtensionKind kind : 1;
const uint32_t index : 31;
};
static std::unordered_map<const swift::Decl*, ExtensionIndex> preloadedExtensionIndexes;
virtual SwiftMangledName fetch(const swift::Decl* decl) = 0;
virtual SwiftMangledName fetch(const swift::TypeBase* type) = 0;
SwiftMangledName fetch(swift::Type type) { return fetch(type.getPointer()); }
void indexExtensions(llvm::ArrayRef<swift::Decl*> siblings);
unsigned int getExtensionIndex(const swift::ExtensionDecl* decl, const swift::Decl* parent);
void indexClangExtensions(const clang::Module* clangModule,
swift::ClangModuleLoader* moduleLoader);
ExtensionIndex getExtensionIndex(const swift::ExtensionDecl* decl, const swift::Decl* parent);
static SwiftMangledName initMangled(const swift::TypeBase* type);
SwiftMangledName initMangled(const swift::Decl* decl);
SwiftMangledName visitTypeDiscriminatedValueDecl(const swift::ValueDecl* decl);

View File

@@ -197,6 +197,18 @@ codeql::Accessor DeclTranslator::translateAccessorDecl(const swift::AccessorDecl
case swift::AccessorKind::MutableAddress:
entry.is_unsafe_mutable_address = true;
break;
case swift::AccessorKind::DistributedGet:
// TODO: Swift 6.2
break;
case swift::AccessorKind::Read2:
// TODO: Swift 6.2
break;
case swift::AccessorKind::Modify2:
// TODO: Swift 6.2
break;
case swift::AccessorKind::Init:
// TODO: Swift 6.2
break;
}
fillFunction(decl, entry);
return entry;
@@ -280,7 +292,7 @@ void DeclTranslator::fillTypeDecl(const swift::TypeDecl& decl, codeql::TypeDecl&
void DeclTranslator::fillIterableDeclContext(const swift::IterableDeclContext& decl,
codeql::Decl& entry) {
for (auto member : decl.getMembers()) {
if (swift::AvailableAttr::isUnavailable(member)) {
if (member->isUnavailable()) {
continue;
}
entry.members.emplace_back(dispatcher.fetchLabel(member));
@@ -342,14 +354,6 @@ codeql::OpaqueTypeDecl DeclTranslator::translateOpaqueTypeDecl(const swift::Opaq
return entry;
}
codeql::PoundDiagnosticDecl DeclTranslator::translatePoundDiagnosticDecl(
const swift::PoundDiagnosticDecl& decl) {
auto entry = createEntry(decl);
entry.kind = translateDiagnosticsKind(decl.getKind());
entry.message = dispatcher.fetchLabel(decl.getMessage());
return entry;
}
codeql::MissingMemberDecl DeclTranslator::translateMissingMemberDecl(
const swift::MissingMemberDecl& decl) {
auto entry = createEntry(decl);

View File

@@ -45,7 +45,6 @@ class DeclTranslator : public AstTranslatorBase<DeclTranslator> {
codeql::ImportDecl translateImportDecl(const swift::ImportDecl& decl);
codeql::ModuleDecl translateModuleDecl(const swift::ModuleDecl& decl);
codeql::OpaqueTypeDecl translateOpaqueTypeDecl(const swift::OpaqueTypeDecl& decl);
codeql::PoundDiagnosticDecl translatePoundDiagnosticDecl(const swift::PoundDiagnosticDecl& decl);
codeql::MissingMemberDecl translateMissingMemberDecl(const swift::MissingMemberDecl& decl);
codeql::CapturedDecl translateCapturedValue(const swift::CapturedValue& capture);
codeql::MacroDecl translateMacroDecl(const swift::MacroDecl& decl);

View File

@@ -185,12 +185,6 @@ codeql::ObjCSelectorExpr ExprTranslator::translateObjCSelectorExpr(
return entry;
}
codeql::OneWayExpr ExprTranslator::translateOneWayExpr(const swift::OneWayExpr& expr) {
auto entry = createExprEntry(expr);
entry.sub_expr = dispatcher.fetchLabel(expr.getSubExpr());
return entry;
}
codeql::OpenExistentialExpr ExprTranslator::translateOpenExistentialExpr(
const swift::OpenExistentialExpr& expr) {
auto entry = createExprEntry(expr);
@@ -498,7 +492,7 @@ TrapLabel<KeyPathComponentTag> ExprTranslator::emitKeyPathComponent(
const swift::KeyPathExpr::Component& component) {
auto entry = dispatcher.createUncachedEntry(component);
entry.kind = static_cast<int>(component.getKind());
if (auto subscript_args = component.getSubscriptArgs()) {
if (auto subscript_args = component.getArgs()) {
for (const auto& arg : *subscript_args) {
entry.subscript_arguments.push_back(emitArgument(arg));
}
@@ -691,8 +685,8 @@ codeql::CurrentContextIsolationExpr ExprTranslator::translateCurrentContextIsola
codeql::TypeValueExpr ExprTranslator::translateTypeValueExpr(const swift::TypeValueExpr& expr) {
auto entry = createExprEntry(expr);
if (expr.getParamTypeRepr() && expr.getParamType()) {
entry.type_repr = dispatcher.fetchLabel(expr.getParamTypeRepr(), expr.getParamType());
if (expr.getRepr() && expr.getParamType()) {
entry.type_repr = dispatcher.fetchLabel(expr.getRepr(), expr.getParamType());
}
return entry;
}

View File

@@ -37,7 +37,6 @@ class ExprTranslator : public AstTranslatorBase<ExprTranslator> {
codeql::MakeTemporarilyEscapableExpr translateMakeTemporarilyEscapableExpr(
const swift::MakeTemporarilyEscapableExpr& expr);
codeql::ObjCSelectorExpr translateObjCSelectorExpr(const swift::ObjCSelectorExpr& expr);
codeql::OneWayExpr translateOneWayExpr(const swift::OneWayExpr& expr);
codeql::OpenExistentialExpr translateOpenExistentialExpr(const swift::OpenExistentialExpr& expr);
codeql::OptionalEvaluationExpr translateOptionalEvaluationExpr(
const swift::OptionalEvaluationExpr& expr);

View File

@@ -36,25 +36,17 @@ void StmtTranslator::translateAndEmit(const swift::PoundAvailableInfo& availabil
}
void StmtTranslator::translateAndEmit(const swift::AvailabilitySpec& spec) {
if (llvm::isa<swift::PlatformVersionConstraintAvailabilitySpec>(spec)) {
translateAndEmit(llvm::cast<swift::PlatformVersionConstraintAvailabilitySpec>(spec));
} else if (llvm::isa<swift::OtherPlatformAvailabilitySpec>(spec)) {
translateAndEmit(llvm::cast<swift::OtherPlatformAvailabilitySpec>(spec));
}
}
void StmtTranslator::translateAndEmit(
const swift::PlatformVersionConstraintAvailabilitySpec& spec) {
auto entry = dispatcher.createEntry(spec);
entry.platform = swift::platformString(spec.getPlatform()).str();
entry.version = spec.getVersion().getAsString();
entry.is_wildcard = spec.isWildcard();
if (!spec.isWildcard()) {
auto domain = spec.getDomainOrIdentifier().getAsDomain();
entry.platform =
swift::platformString(domain ? domain->getPlatformKind() : swift::PlatformKind::none).str();
entry.version = spec.getRawVersion().getAsString();
}
dispatcher.emit(entry);
}
void StmtTranslator::translateAndEmit(const swift::OtherPlatformAvailabilitySpec& spec) {
dispatcher.emit(dispatcher.createEntry(spec));
}
codeql::BraceStmt StmtTranslator::translateBraceStmt(const swift::BraceStmt& stmt) {
auto entry = dispatcher.createEntry(stmt);
entry.elements = dispatcher.fetchRepeatedLabels(stmt.getElements());

View File

@@ -17,8 +17,6 @@ class StmtTranslator : public AstTranslatorBase<StmtTranslator> {
void translateAndEmit(const swift::CaseLabelItem& labelItem);
void translateAndEmit(const swift::PoundAvailableInfo& availability);
void translateAndEmit(const swift::AvailabilitySpec& spec);
void translateAndEmit(const swift::PlatformVersionConstraintAvailabilitySpec& spec);
void translateAndEmit(const swift::OtherPlatformAvailabilitySpec& spec);
codeql::BraceStmt translateBraceStmt(const swift::BraceStmt& stmt);
codeql::ReturnStmt translateReturnStmt(const swift::ReturnStmt& stmt);

View File

@@ -225,8 +225,8 @@ codeql::BuiltinIntegerType TypeTranslator::translateBuiltinIntegerType(
return entry;
}
codeql::OpenedArchetypeType TypeTranslator::translateOpenedArchetypeType(
const swift::OpenedArchetypeType& type) {
codeql::ExistentialArchetypeType TypeTranslator::translateExistentialArchetypeType(
const swift::ExistentialArchetypeType& type) {
auto entry = createTypeEntry(type);
fillArchetypeType(type, entry);
return entry;

View File

@@ -68,7 +68,8 @@ class TypeTranslator : public TypeTranslatorBase<TypeTranslator> {
codeql::BuiltinIntegerLiteralType translateBuiltinIntegerLiteralType(
const swift::BuiltinIntegerLiteralType& type);
codeql::BuiltinIntegerType translateBuiltinIntegerType(const swift::BuiltinIntegerType& type);
codeql::OpenedArchetypeType translateOpenedArchetypeType(const swift::OpenedArchetypeType& type);
codeql::ExistentialArchetypeType translateExistentialArchetypeType(
const swift::ExistentialArchetypeType& type);
codeql::ModuleType translateModuleType(const swift::ModuleType& type);
codeql::OpaqueTypeArchetypeType translateOpaqueTypeArchetypeType(
const swift::OpaqueTypeArchetypeType& type);

View File

@@ -13,8 +13,6 @@ lib/codeql/swift/elements/KeyPathComponent.qll cc64d5a3cc6e6aa12faee7dfc95e6b5e1
lib/codeql/swift/elements/Locatable.qll a4e01abd3f337a60e3741705cede50be974ccffcb707a53f2b378972838c5977 89ba4dbebcfa291797407c27087d91a18b1ec1bc97140a14ec08dbb12cef7395
lib/codeql/swift/elements/Location.qll db213e8e27f8d732ad472c16929f2c503634c622d4d7b6b6977ed8b7b3c71c5b 9b951af94891848ecea9a690741e4a401c4b7ad676fd1fcee703fce4dcee2da4
lib/codeql/swift/elements/MacroRole.qll d55500010c47fab14fb2110db0afadef5f1f01115d05c803c9fd114508aca6da 858a7fe124cb8874e1fe62b3b36153740b0bb1cd1e9ed0005b36d01040960ed8
lib/codeql/swift/elements/OtherAvailabilitySpec.qll b3e3aafc7b1f7b1ff2efa2bc9ff64370cc6847760a46ff5594f5144caee858ab 6630e73998c9359b6cefd265222cb72274b4484d6904b4a9f949bdb7a2781c0f
lib/codeql/swift/elements/PlatformVersionAvailabilitySpec.qll 1a94d317cbb1731844986b57bbdc4095d90957c671d5248bc581bc1fdbb18f8b 3888eb1afc641d365c30fa514962f1a31b9b9c04383836e0062445e566003d34
lib/codeql/swift/elements/UnknownFile.qll 29e9f59c24c3ee6c2b01ea19390dd6730192628e5e4a541c3c00a42d16daad78 0ec046d67ebdc1722915b0d952468d1d3c3dfdf2c61e7fa215c7ba2fb91de04c
lib/codeql/swift/elements/UnknownLocation.qll a03b4ff4f3505a35fbf25e150944e217030d187b8ab314bf0657bcab67ea40cc 2e3a1271f0df925c1deae232b26ba031322611f87f0326fe747475445c0e2485
lib/codeql/swift/elements/UnspecifiedElement.qll b1f597cae6585531aec383b669bda76b710dc2b61caf352347786584faf63ff4 858a15ed565231c15d09aa2e15acd4842a23ef8b0f76de792297fa8062e2f287
@@ -433,7 +431,7 @@ lib/codeql/swift/elements/expr/internal/UnsafeCastExprConstructor.qll f8771eb8f6
lib/codeql/swift/elements/expr/internal/UnsafeCastExprImpl.qll 787104ce97d702c0c3efa81a0f8416584f35c454d3b2ffe7bd0917861589612b 50496a0f3f3a9e3d5a2e6cbcd5eb16b634cf3fd5e0878bdf017678243dbfd8a0
lib/codeql/swift/elements/expr/internal/VarargExpansionExprConstructor.qll 917701083da11fce895c53d5f3e0a52b8e3142e9aacdf1d8536a4216ef377b16 b72ca103ced9cbb45f2ef9387387b8aaf3134e358ae5a03fa3ea242896954c81
lib/codeql/swift/elements/internal/AvailabilityInfoConstructor.qll 89c731f266122a3434b88dfd573d68c50b5c4fa5e13c2443c54f78e682190d1e 86beb6f684e08b6f557b7d67bc164113e9f5270c09bbe95fbd81c558d77f7f84
lib/codeql/swift/elements/internal/AvailabilitySpecImpl.qll 9ac9285e731938747c574c3f270aaead323656162bd34a6630c1babfaaf25a6a 900b2e638639f427506b2d0eb2806b6ee119ea63ea4ce44758e0c36f2ce915ac
lib/codeql/swift/elements/internal/AvailabilitySpecConstructor.qll cca46cd2908923a08b7f6a8bea0c0c11071523bcc421bfe141d0e0bafd8dfcb4 cbb1494346379083c0f275111eca78617591568894258a6b73efda34f3fba1ba
lib/codeql/swift/elements/internal/CommentConstructor.qll 46891994c032546e7323f343947fd57cabb6c0e2ad1ca78f113c5b04436be203 e05b3ba3e00437488fdf53361211c6e5c3ae14ad1fdaf32093b02bdea2076abe
lib/codeql/swift/elements/internal/DbFileConstructor.qll b5b680f255180d0d38223d6ac4422f192271573dca62f2967dde874147e710df a9c8d1c7abb5516c1d22ee9e020266297e52a2cd84f892792c1e6476517a6737
lib/codeql/swift/elements/internal/DbFileImpl.qll 09cbe97ad1d1d464bd9a374111e4e6bee0781595e5474809c415aade04431d90 b204d164e7a10ec4a77e0052710339a2c96ba6d42da547cc03cd23c1bd898261
@@ -443,8 +441,6 @@ lib/codeql/swift/elements/internal/DiagnosticsConstructor.qll 5212997161b95b0b10
lib/codeql/swift/elements/internal/ErrorElementImpl.qll 4ddf6e99bec6125bc5b24bc65d83cca131dd05748f71a85c8f0284659c3a0c49 db606ce97fdf2d2f38a66c7a4ef1437c8a3f6a57b71e426ec2bb0329d9e8a193
lib/codeql/swift/elements/internal/KeyPathComponentConstructor.qll ff71795157639520f56ce99ed49bf25486c125a0f27a3bb3ba2c8492feca13b2 5875187267cf91e37426d817a6c0c5e7ba9ddb0bd840ad358338ba003e0a877c
lib/codeql/swift/elements/internal/MacroRoleConstructor.qll c45c189fd441e2c23b1c94dec9f357192f5e392051e0becf52c020d830e38e54 e281ef4ba76a6e4b2b689e00f542ef585cec7a540911ccd7fbb59f3232f08a3d
lib/codeql/swift/elements/internal/OtherAvailabilitySpecConstructor.qll c5638ae4f3993c7a111fb2a516667190642c1948f18806cf29f78b7067021d10 cc93ac54741ba952b32385db0fe072576a9c8697cd793bcb8faed98f0fb6bda0
lib/codeql/swift/elements/internal/PlatformVersionAvailabilitySpecConstructor.qll 015280737e71fe1084da6056410fd73dc4473a3b3296d0e46c0ca64f07dd5b7f c735c42e45ebdc308a1f02ff15d65d4d1154071e55645a9ae763d6c021d7f601
lib/codeql/swift/elements/internal/UnspecifiedElementConstructor.qll f7e232dae7362d0c3f9f33f952d9106da3d273f16b124008919fba6e40a944b6 eb30f05ae09f2c7bc93d758c0870b63f16bf61d0d2446ed827250f89772596ab
lib/codeql/swift/elements/pattern/AnyPattern.qll b0ccc58de123e61705dde8bb655da0cb02ea981fcb4d4f8d0e205dfbd2a9bedc 55751b143f758968cd006cc70f1d90a9917d9ac7eb319364b2485282944d2835
lib/codeql/swift/elements/pattern/BindingPattern.qll eca835e58ecbb2096615c88b659c8782158c636501e7f21d38e303fff7a6a2fe 8cc4040c7c5357904389b61e98837d9da2c4aad65039b99ade3f4f9fac4d4479
@@ -555,6 +551,7 @@ lib/codeql/swift/elements/type/DynamicSelfType.qll c7eecfd41722f2fadc7de0783a8e7
lib/codeql/swift/elements/type/ElementArchetypeType.qll aa920ff09b80d5a4ff5fae22a975ba5debceef3f8953e536e06aba486edbebba 390a084f6b08c232d93ea1a590d1ca73585faa44ba4eb90b7c51e3ecf24cb4c7
lib/codeql/swift/elements/type/EnumType.qll f6d0174ba79d36d7c1b9d5dc0ede4400a40e7f427e1198721c1774c768ad3927 07f3390dbd2c4040d9fff8df2bde8c3611cb1e72a9d8e663331a96dded353a0a
lib/codeql/swift/elements/type/ErrorType.qll 4867f96662daa7e667e92fa939889e4ba54d6e139088a640a5472a9c2169e193 b41bebd9ef623d318e39610b5c193648c9b1d36d68770abce995492f0f507415
lib/codeql/swift/elements/type/ExistentialArchetypeType.qll 79e9d421457aee301bdfeb289240419e11dd5c9e3b5656f742b57cedc2de0ae0 0df3e401c0ec4d8e5ffae7bf879a8006a7e538dd76cf3cbe3a8650d5facde5ec
lib/codeql/swift/elements/type/ExistentialMetatypeType.qll 08c5cfc4deaf241861a800a0293a90beba953a5176dc9ec16e73aeb11ffeb6e0 6ecafdd2412b0060ad6b040587ae1e6e66597f2e20e452de4e66f3444376e527
lib/codeql/swift/elements/type/ExistentialType.qll a334e666928a0c50c9ae2f4b7cc891466254954a755c10a19b2b82b8544902ab 57c7ebf1263a8ec399fbdaa1b7eee2e81f633cd020032e2f575ab9d7fe7f4b97
lib/codeql/swift/elements/type/FunctionType.qll 1a64eb24e8baa74ef2a8e4451f97442aa6f86dd8160eb1f7c4fcd62342ef9ec5 3549451d8443215a5342e3c1b1e3910e71c217a382e42c8916c9435525c49940
@@ -569,7 +566,6 @@ lib/codeql/swift/elements/type/ModuleType.qll b37f2a919271463a1317e2933d078d3c72
lib/codeql/swift/elements/type/NominalOrBoundGenericNominalType.qll d41c27edffe38a8dd0e5fc17e0f9b355e7ecfdc80765fa36f4f00545af47d5c9 83a2f9ff32fec675f011683f64969ce42e2cf2301f48611ecc056242b0116bef
lib/codeql/swift/elements/type/NominalType.qll 5071658ee2aad7f9008248bc632873695150d95ed6260eecbc5c7c0394823bb9 e7664bde6757e207191348d031c27dda9b614628ff7b85e897d9942907f24ea2
lib/codeql/swift/elements/type/OpaqueTypeArchetypeType.qll ba746e5ee3e9723cd279b94b4608f10670a26a80d1db5e721eaaacd049160772 7fecafbdf1b1a60200dad6bbcef099470e1f2d34638bb6be6580f11f47e63fa4
lib/codeql/swift/elements/type/OpenedArchetypeType.qll e902fc1f2ca854a5601dbe6d3e1c1178729f3a38f739335c85355cd3823f79bb 2b16f97a51adad24dcd2c27b1bbedde9e6794920afaec38cd6bf6a769daee15b
lib/codeql/swift/elements/type/OptionalType.qll 55fff926b9bbe5b2c3ca0963750f71809425578f3fe08de86fe7f25f5729eb53 5aa94f386dd3b251e7ea739c26d3c3fca8f98409627be24765b124d97e70bfa8
lib/codeql/swift/elements/type/PackArchetypeType.qll 74a688b176c41a2caed819dccda6f450d9b171f5ab65480073866a217d3c6b39 a5dda9d35b8024665765bc773d071b396837ca49b827ed3d8200cb8a1bdff87c
lib/codeql/swift/elements/type/PackElementType.qll 696ce6efe66eae0554e9919e13cb8e5dcb6c8c218bcb6b8abbcb4bc3f9cbcff8 9fb68c75c11573fcd0fd1048ed1eeec8d5974fafa66e69d8515181c72d5d1230
@@ -650,6 +646,8 @@ lib/codeql/swift/elements/type/internal/EnumTypeConstructor.qll 42082a8131a1d23a
lib/codeql/swift/elements/type/internal/EnumTypeImpl.qll e1882e9bf4a5758d931066d21af82b10de241593fc632844db4220dfa1b40051 7903e471170bad4ac51971c614c3d5aec81453630f9d74792a6a782f76aa6491
lib/codeql/swift/elements/type/internal/ErrorTypeConstructor.qll b9c8b309ccc948b5956355b3d3398c1e52317b3c0dfbef0683b2dc62fe2e5054 e30fd9785602b50081917e82b03776bd98774fe45ff35734497cc0816f284cd4
lib/codeql/swift/elements/type/internal/ErrorTypeImpl.qll c04c074586ee94c721c8ee4c75f2213098a004a69df08d5585d9b3c2a52ae44c 1fcd9cdadbddfd1f89d9cb0962fd767ccf920b26975a9557c4d758933ebd27b3
lib/codeql/swift/elements/type/internal/ExistentialArchetypeTypeConstructor.qll 135a26bed100d6aae55925fbff1769cb61069488d8b7a19462429d0ebba9d0bb bcff385e197dbff3855f492b6c1d25bd5db2eb6a7cb66ccce80309e9c8f403bb
lib/codeql/swift/elements/type/internal/ExistentialArchetypeTypeImpl.qll 7c78ae15e6428b8ed103d2d28f719eff388a21615bf68b777a83e22c62aa70aa ab76d66eda10dc4af67eab6ba0757f2f452b75354f9f5d788fe3671d8dc7724f
lib/codeql/swift/elements/type/internal/ExistentialMetatypeTypeConstructor.qll 4055299dc6cf43e7a12f325913fd84b58761dcbfc14aaa27dd494eae1c282a99 c28e1ef4c8da26eaca30726bf3a81547bf3996cdfdf4b35cfc062d574e791d86
lib/codeql/swift/elements/type/internal/ExistentialMetatypeTypeImpl.qll 5aeaabe063cd7d9950a46fa4821f8d950c7583a4652f7e2741d81e19281aa873 c5ad2564888f6c10ac2478d72c5a436cec111824781b992adb9bddc723f13faf
lib/codeql/swift/elements/type/internal/ExistentialTypeConstructor.qll 65aeccb1d9b403e4efee678c7af1e8bb1359f6ffed7a2e75945330a19276b25e b2da77005c4cc9dc8dad8864b222de781863f93996b0128346a0464a7cacdd8b
@@ -673,8 +671,6 @@ lib/codeql/swift/elements/type/internal/ModuleTypeImpl.qll d13df337e9b7873c3db9c
lib/codeql/swift/elements/type/internal/NominalOrBoundGenericNominalTypeImpl.qll 6da77c694a1d7e3e3ab889b9fa5bbc0c5940b7ce3e2ea1170f78566589b8275d 5ba1224ee1a942e5d5453effe5434d5b3d7dd5e68979e7c1ea3bab7ff3030484
lib/codeql/swift/elements/type/internal/OpaqueTypeArchetypeTypeConstructor.qll f33bf566ae7881e6b4c5327602bfd4275bd5344d0f9fb764ebe02b9673ab29ed 88ad64e4c114f34a952701fff67386d43982dacd2845eead408230447d3c0506
lib/codeql/swift/elements/type/internal/OpaqueTypeArchetypeTypeImpl.qll 402568a45ebe986f2086c765649414b218a262e103ed19d73de3754cc84327d8 b7ef0cbfdd74083403ace6e0d8e6b0502fba1267d04a16c7465fa8b5dbce4138
lib/codeql/swift/elements/type/internal/OpenedArchetypeTypeConstructor.qll 729a7f0545d9aa3449e92f60f1ff780188135c861cdd119a678569d27684f4c0 e6f51320aec9202d97695228b684cd35ed5f26cdc8576621ad74ca0a5f707fc6
lib/codeql/swift/elements/type/internal/OpenedArchetypeTypeImpl.qll c8d7f2493f1fd23f2e5c1707ff5209e7345e939b8e9a499f8df28dd4fca77bd2 616ac345e28f858cd1f3571662cda187e2368cf19af6456675dcdac9eb30b714
lib/codeql/swift/elements/type/internal/OptionalTypeConstructor.qll 648493a385d8a95b665fff776f52e23ecdc2a4baa355328fbb218a1510ff807f 4249552ad87c3e474e32c89e6bf6302d7de5d15980c550f97ec8576a5801770b
lib/codeql/swift/elements/type/internal/OptionalTypeImpl.qll ac452e2c2883cd9aa7e460032a6f920e10c34a7e04a306b0c6b7a9c637f5b9d1 2513c2da982ed0a11687b5d3938de9e029742ecc1b6942b28e443aafe951f7e6
lib/codeql/swift/elements/type/internal/PackArchetypeTypeConstructor.qll 11ceeb4d0d337cde182804dc1b56f24ae624b74b55f62979c166172b53497a11 b46528bc0673a80a3d5ce29c358105b876967b73ae4a5596e6d7cf82e2292144
@@ -716,10 +712,10 @@ lib/codeql/swift/elements/type/internal/UnresolvedTypeImpl.qll ee1499dd568753898
lib/codeql/swift/elements/type/internal/VariadicSequenceTypeConstructor.qll fc74a5a2a2effa28ef24509b20ee4373d97cf6e8c71840121bb031c6adedf584 c9b2effc1d01c13c5e6a74a111122fa79a2f6554dda3cb016d68ba397e566ec4
lib/codeql/swift/elements/type/internal/WeakStorageTypeConstructor.qll 5fdce3716aba6318522174a2c455a63480970222ae81c732fb19c6dd3ae2d271 60ea79d6943e129deba0deccb566cf9d73f78398b0f7f0212674d91287d6b2ae
lib/codeql/swift/elements/type/internal/WeakStorageTypeImpl.qll 74f79b458f3204ec2519bd654de21bc4fb6b76816bd8ca01990fe897563a1383 34e1810f74cecda5b580ed050438ae1d914b97a36b8f4e2de1c25254c0cac633
lib/codeql/swift/elements.qll 2c093130866888903f5a97cc41072ad94c795d296fca6492d6db481b1ca39d94 2c093130866888903f5a97cc41072ad94c795d296fca6492d6db481b1ca39d94
lib/codeql/swift/elements.qll 84a5704b697f4a3f224ec2b99d49f4d2a6ee2655aa86c72ea1cbc901b8231879 84a5704b697f4a3f224ec2b99d49f4d2a6ee2655aa86c72ea1cbc901b8231879
lib/codeql/swift/generated/AstNode.qll 6fb80e9b230a1e3ae8193af40744f253d5cc81dc4239156924e5ab606c491efc e5c28418e9a38bde08f323a3986a199620189fc4a8a4dc8f670610a5d3d65b99
lib/codeql/swift/generated/AvailabilityInfo.qll e3a5274c43e72ff124b6988fd8be0c83a41b89337e11104150dd0ca7f51d8a11 889563791ca8d9758dbbccf64a0731c4bdbf721cad32bc6cd723f1072b6aa1de
lib/codeql/swift/generated/AvailabilitySpec.qll bc64d5c690c4d18800f0a48cc76a6a9ee4f832041343666da2d8df2aae04ed7e d03bf874293ac0ab09c025f75c0f392473d47bebe3223143adcc13882a366119
lib/codeql/swift/generated/AvailabilitySpec.qll 1bd2a0ee085f802c99090e681ab3339fc5013024d79deef39f376de12ab76d37 658f2eb51860726cfa6808b3e3501d624e0734750d1420f7a25c89782f1f6c7e
lib/codeql/swift/generated/Callable.qll 6213871affd0e1fb176a36b28ae5d0c1af9f9927428d07c23660cde9e3b0bf64 02eaaef87c919f9ceb92e59fa895f5133904bce6d23ea9381e1210377573ddf4
lib/codeql/swift/generated/Comment.qll 64625f47ebddb1ec7e1c81790dd8120087a76958cba5cebe31f8d1f221740cb9 4d87eed099c645b43272ae806106a8d787e84e5e55ea4f1bbc7b79bf0b127d15
lib/codeql/swift/generated/DbFile.qll cc0d2b9efbee36080bde2e26e424a40efb763eaee55874fb6c4a5db36938f3df 33e215d838cfa36e3dd0e62879e896d988430d1470a87ce1bb45aad70886212b
@@ -728,17 +724,15 @@ lib/codeql/swift/generated/Diagnostics.qll 03ea201db80d33b18f7f6c71267044c695c25
lib/codeql/swift/generated/Element.qll bf8f688e05f44f18384067c3cab7f05796764e2b4cce7ff24da419c3dae26194 820390ffbb1012f73267668626f7d0ccd368500331c91bbc276fcb1c25037e41
lib/codeql/swift/generated/ErrorElement.qll b39bd7c8b4e2011f4a6889e073ebf5b628db32f36f50b067250ae730d9f26561 fd859ec969ba434049e7ba4e78271cc8cebc8b058d2e96e4d47a22064cbb5a21
lib/codeql/swift/generated/File.qll 476ac95566ef0080e0ad8c3da144b1be1d945d2f33a24f0864d85ff7c56a09b1 3134018bb50166cbf2690f64bba551cace350e4a7e6e25bcded18f997ad1835b
lib/codeql/swift/generated/KeyPathComponent.qll 5276acdc9a4ff0ec0cc8af615c04043391fb99613731ddcc86db4e47b37c8c5a ccc0931bbd6cc2cfae5037c2ee17bbdcbd87536f5fed90d07e73065c016c4382
lib/codeql/swift/generated/KeyPathComponent.qll 99d1699394bb7f9ff904e2d44149f20d3e08e35df171a6141f111c9ac9138b62 d8f62f60cc2c1e73146af79e5567c04cd273b73bfb5202bda964ec15032cb040
lib/codeql/swift/generated/Locatable.qll 1d37fa20de71c0b9986bfd7a7c0cb82ab7bf3fda2d2008700f955ad82ce109a7 e97d4d4fb8a4800e0008cc00f60c8ed9b1ebd5f1140fd85e68b034616178d721
lib/codeql/swift/generated/Location.qll 5e20316c3e480ddfe632b7e88e016c19f10a67df1f6ae9c8f128755a6907d6f5 5a0af2d070bcb2ed53d6d0282bf9c60dc64c2dce89c21fdd485e9c7893c1c8fa
lib/codeql/swift/generated/MacroRole.qll facf907e75490d69cd401c491215e4719324d751f40ea46c86ccf24cf3663c1f 969d8d4b44e3f1a9c193a152a4d83a303e56d2dbb871fc920c47a33f699cf018
lib/codeql/swift/generated/OtherAvailabilitySpec.qll d9feaa2a71acff3184ca389045b0a49d09156210df0e034923d715b432ad594b 046737621a8bcf69bf805afb0cff476bd15259f12f0d77fce3206dd01b31518f
lib/codeql/swift/generated/ParentChild.qll 86a6c9ba4c79d72bf7a0786274f6fba49e6f37cf82de0451a6dad0d319224ebd f7b99ceb052a23d7c25d1615d1453d421b5ddddcec60b7d8d6f956d0d3fd7a2d
lib/codeql/swift/generated/PlatformVersionAvailabilitySpec.qll dc17b49a90a18a8f7607adf2433bc8f0c194fa3e803aa3822f809d4d4fbd6793 be48ea9f8ae17354c8508aaed24337a9e57ce01f288fece3dcecd99776cabcec
lib/codeql/swift/generated/ParentChild.qll 88a8941821b1f511925eb8955ff25065a6004c61aa866854ee941d7556b1eb6d 6e32b4902cea8a78a9b2775826d64300987932c406212d841deeab7c48a5ef8b
lib/codeql/swift/generated/PureSynthConstructors.qll bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4 bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4
lib/codeql/swift/generated/Raw.qll 96d5f8778f25cd396b5cc56c38dce597c5a9a5c2b1e9ed8b9a4d2eca89e49323 d65072b5c508dad1dd813e19f7431087d8bfc0e5d85aa3d19beffbcbbec585ec
lib/codeql/swift/generated/Synth.qll 2b0f1a8911c1981ff50b78331bdd1f3f6023ad87a4ae3a92088901f493bb62c0 bc94ca1d86033e04b0999da84b61955ea1d8f4ac2379be527802512a42a16964
lib/codeql/swift/generated/SynthConstructors.qll d30b83f9d8d310414bb1261af386b70502df48159d06579bb2610e18ef546c3d d30b83f9d8d310414bb1261af386b70502df48159d06579bb2610e18ef546c3d
lib/codeql/swift/generated/Raw.qll aa47e81ab3004a0049da3a85f25456bba15ed37329622153c154a296024077f3 46e9fb37fadc23d168fd43cbe77a792ba8e56aab7f4a3a984add1928efd4ac78
lib/codeql/swift/generated/Synth.qll a472fca73084eedab9ca8bb2fb82e7573d525444bb8d3729a3d18e06647fd96d b19984583774e30dae481d3d5cc95ebf2843c04dd952eb16cbf8a702ae52bbd8
lib/codeql/swift/generated/SynthConstructors.qll f3687a56d2fd9bc38d95d9ca335f558a91c865bd0bd1c7c73affedefd7514183 f3687a56d2fd9bc38d95d9ca335f558a91c865bd0bd1c7c73affedefd7514183
lib/codeql/swift/generated/UnknownFile.qll 247ddf2ebb49ce5ed4bf7bf91a969ddff37de6c78d43d8affccaf7eb586e06f2 452b29f0465ef45e978ef8b647b75e5a2a1e53f2a568fc003bc8f52f73b3fa4d
lib/codeql/swift/generated/UnknownLocation.qll d871000b4f53ffca4f67ea23ca5626e5dcce125d62a4d4b9969e08cc974af6fc b05971d7774e60790362fb810fb7086314f40a2de747b8cb1bc823ec6494a4dd
lib/codeql/swift/generated/UnspecifiedElement.qll d9ad4ba1ffff90cc465e8ba0dea8c4e8ba67dce5529b53b63ab6dc8e13c85e67 025218e1fee8ee382b63ad38009dfec73dc604d2ba80b9ad956c7c96eeed7022
@@ -991,6 +985,7 @@ lib/codeql/swift/generated/type/DynamicSelfType.qll 999b59b887b6d550645832bb12ab
lib/codeql/swift/generated/type/ElementArchetypeType.qll a3cc0d5c0feb8bc446c19f97d311da3a964af6a1d4275496bb506c6094cb6f55 5f8f73bd2b524c3ffd0eaedba90c348d8743add15d1004b4da3a6ffbf6ec3919
lib/codeql/swift/generated/type/EnumType.qll 258be7d8b1a17ba0c7253b12603c607a2f241b274b329c9124a8158128e77a47 11ac74f5da5dbb5d80efd86c0ffd127f673233fe0e25da68cf691fa2839baab6
lib/codeql/swift/generated/type/ErrorType.qll d6d3b9457d40d762f9441daf434062a0b2133dc9ef3aa221a655269c5522dcc5 c0c06692f37132098f5306f8c061d71140692a23a5e2a376350aae99854119eb
lib/codeql/swift/generated/type/ExistentialArchetypeType.qll 54bc16dcf5da69fb444493738ffda37e0e7d85102a6fc5de39329b12e6d5aa70 d56e7bdd2853911dc38387be408dbc1b4430eb4b9284496545e2052f325315e4
lib/codeql/swift/generated/type/ExistentialMetatypeType.qll 7d497d364ba6d9416bd2fdb561332d7038a36cc3d887a08638b389c74de59159 29dde0610dc53b2c14fd1d6ec4014ffb9979195e8e8487b32a982317609f3476
lib/codeql/swift/generated/type/ExistentialType.qll dc6e1afb4134e6bb5c63fb86ace78b695224a7bee1fb813799bfb36521e2dabd ef33867f67867021739ae021c6ed763e397f1f299145ff3076980c9dfcbe7a12
lib/codeql/swift/generated/type/FunctionType.qll 739192b77787905a66d9c9970dc077c3fb458afc038b3b8d8f12f965b2cad1ad 4952c360a7277972bdadbdb9d8dc475153d0c6de50f7b8e7de4c7259abf2541b
@@ -1005,7 +1000,6 @@ lib/codeql/swift/generated/type/ModuleType.qll e4d7d1e1b0854b56e86b2e6d73b06c5e4
lib/codeql/swift/generated/type/NominalOrBoundGenericNominalType.qll 992bc2e47d0659b8c92a8907614e3d940310befd35767d8a19c70c2db034e36b bba0cf99f299271c893e482881f586e298a35ad48c59ba1a07d216fd5f731a99
lib/codeql/swift/generated/type/NominalType.qll a1d4865e7c4cc8362c16ed728429851660c84c5d30622c43502f046aa5adf507 337d377662ba3a5232124c80ee008a0d1c56635c1bd59a35cbe82fbb54c0a6cc
lib/codeql/swift/generated/type/OpaqueTypeArchetypeType.qll 64b1f4b6c76b89e3b11eb3f811f8f1664685980db605721b28a2d503a1c9e972 6acfc69f609e1a0873a2a4d5ad5665c1012a0e89eb3459be35d3a48ef5a304f4
lib/codeql/swift/generated/type/OpenedArchetypeType.qll 74dcbbf286185787526552c624c740de59cb55b774640492797b58532bb1fb1d 298f136e82ab66af6894db33881fd8a2ddefaa99b3cb522b0f342b6fd3f6ec48
lib/codeql/swift/generated/type/OptionalType.qll f708e44e676d72274bcb823028aec6122875443de309e2c4e0ca04a18cb4a741 3c2a350fbd32b3297161ca14e050c7d75d3d5606be8adab59a4f53d514794e9d
lib/codeql/swift/generated/type/PackArchetypeType.qll cc561152cbf2eae8482a82997fe1725dccd172ee93d091df47d620f5c7cca2fe 278bf4d686f9b977882f98de695ac41575ba589d7838ad077dcb04ba1f95598e
lib/codeql/swift/generated/type/PackElementType.qll 997dae178f56757eb1e0c2ea6496dcaf9886e37d7b6b92bd849807beac630b9f 924e898526b3bf758f339e384025dc87fb64e0b0ce8526d63cbe7170d7e6ec73
@@ -1033,12 +1027,11 @@ lib/codeql/swift/generated/type/UnresolvedType.qll 3b99e19ca7177619fb79e6e8511df
lib/codeql/swift/generated/type/VariadicSequenceType.qll 7ece2c953e24d1c51715610f2813bd97f6d9fc6e58e5df0aacadad31e1fd1d8f be0005d973fd7c4c937fc340711fafe7ceba592ac407b88731bc35a1c2800aeb
lib/codeql/swift/generated/type/WeakStorageType.qll d46b67f2b7bcc8aa7599e38506e91c219f894df4668ff1f0b5b66c1858040f5b c8e34ec9df085d938e36492d172fbf84ca56fc9d805713b8ada92e1b4c7bef54
test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.ql 0bb0cfe3f8c38af3b870f8c404c16a5715e80d5ea8fd7939cc13032d7b824809 142ae1e76138b287aa66e091683aae545d139ef2971624e2dfdd3ea454bc2d05
test/extractor-tests/generated/AvailabilitySpec/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
test/extractor-tests/generated/Comment/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
test/extractor-tests/generated/Diagnostics/Diagnostics.ql c1f8be2c283e13c1a4dadaa008e42f660ea09d9ee1de22b0e8493ef76384546e d84efa40eaecbce6b928a5b235e10bf1e4409a9d0778c365ec19d2fade7ab3ab
test/extractor-tests/generated/File/File.ql a1385ef2080e04e8757f61b8e1d0129df9f955edf03fbb3b83cc9cb5498b4e95 0364d8c7f108d01b2641f996efedab7084956307e875e6bc078ea677d04267e0
test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.ql 3fa617f8ed1b308d0c56f429ee8abe6d33ef60bf57d87f6dc89fdc8fe969a102 c2fa3153077dbe9e0fc608524dc03c82ff4ed460364d341ee6a817b0d75291c3
test/extractor-tests/generated/OtherAvailabilitySpec/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
test/extractor-tests/generated/PlatformVersionAvailabilitySpec/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
test/extractor-tests/generated/decl/Accessor/Accessor.ql 7e50dd3c4119162bbfa3e2461300d876c60321d4b6473ddd35e0cb992108570e eb81ed8db92bff46974079e0f1100cf94bd639191a36db45ee9e65467abb6e38
test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.ql 55a78a6b96a17532178a39bd39aa4df23295f98019bb00de041ba15dfd4f84d9 51dbcd86203d5d031d748f77943a81c2c50de4ff559af20a4a1a682a19978d4f
test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.ql fd62be6c38d39f371c20e8c2f233e37a9da5aa234588920634f5db67e8beb3bd d51d35d4fd6a21cd596e064e0221d0c86e36312412a9bd4e64f431c123f3019a
@@ -1188,6 +1181,7 @@ test/extractor-tests/generated/type/DependentMemberType/MISSING_SOURCE.txt 35fb3
test/extractor-tests/generated/type/DictionaryType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
test/extractor-tests/generated/type/DynamicSelfType/DynamicSelfType.ql 62da270e23b080f8ceb9ec5c130f84ccd779c43cf30c88db526ef061269c5ce9 390cb48fd7873210f5f5b4e8f275347348336a1e8161c72d3fafa5f7fee90f93
test/extractor-tests/generated/type/EnumType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
test/extractor-tests/generated/type/ExistentialArchetypeType/ExistentialArchetypeType.ql b2f71d888599d3df876dd65dfb4e2e0314f6f1354945b8d467fbe04430d155f8 7e35aec4e133bb76d1fbd87a715014b81b39021ee3f66f49e25292c1388628a0
test/extractor-tests/generated/type/ExistentialMetatypeType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
test/extractor-tests/generated/type/ExistentialType/ExistentialType.ql 7e09bbea166a4f269ecef1113229e98dfd7ea68ea5d4025af492fcce48698420 a4d00ff4100138020af51e8264d1d243156e52ab417bb150d33e9e1cc8cb0a69
test/extractor-tests/generated/type/FunctionType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
@@ -1199,7 +1193,6 @@ test/extractor-tests/generated/type/LValueType/MISSING_SOURCE.txt 35fb32ea539315
test/extractor-tests/generated/type/MetatypeType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
test/extractor-tests/generated/type/ModuleType/ModuleType.ql 7d78142dc82b06e454b9875a47890d5c2364e51f6e496640d6c4d20327f535b7 cecd45f6a4b0f137cdd7e694259044016ab01da6a42e73c3a361b4d00b594133
test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.ql 86bc4823c19da17cbcebe3a4634eccff0a96cbebd174d8d4b1610e3fda3f8bdb 82179cb6e188a3a271428de4631c2a6fa4cec2e65a628fb56c2cbcff8a6a13d3
test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.ql fdbbc1cffb209097480596d3be405188d045758da03a7980511d56874690b9c4 9ba8ffc028988a21cd751d25f0c363c3c37dfc0a13629379c8ca94b6b066bb7d
test/extractor-tests/generated/type/OptionalType/MISSING_SOURCE.txt 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d 35fb32ea5393152eb7a875b20b4e3e4b8c7a997a8959c32417140d57a16a052d
test/extractor-tests/generated/type/PackType/ElementArchetypeType.ql d4d695dcd0e723cdc9f196d828e22a3650ac751f0488e257f3bc2e2afbc343ec ff20bf849e18621b6193699bf58b3d6d127c29113dc996100bc18938fdf4658c
test/extractor-tests/generated/type/PackType/PackArchetypeType.ql 56e7f72a2d6f03e394a5e7103e337aee06b8e1fa9198d8f6123c44c4e33d5b57 e7259313ade883242bffb8e812da64c77108b55acbf39d7b8cda47251ee5f5d3

21
swift/ql/.gitattributes generated vendored
View File

@@ -15,8 +15,6 @@
/lib/codeql/swift/elements/Locatable.qll linguist-generated
/lib/codeql/swift/elements/Location.qll linguist-generated
/lib/codeql/swift/elements/MacroRole.qll linguist-generated
/lib/codeql/swift/elements/OtherAvailabilitySpec.qll linguist-generated
/lib/codeql/swift/elements/PlatformVersionAvailabilitySpec.qll linguist-generated
/lib/codeql/swift/elements/UnknownFile.qll linguist-generated
/lib/codeql/swift/elements/UnknownLocation.qll linguist-generated
/lib/codeql/swift/elements/UnspecifiedElement.qll linguist-generated
@@ -435,7 +433,7 @@
/lib/codeql/swift/elements/expr/internal/UnsafeCastExprImpl.qll linguist-generated
/lib/codeql/swift/elements/expr/internal/VarargExpansionExprConstructor.qll linguist-generated
/lib/codeql/swift/elements/internal/AvailabilityInfoConstructor.qll linguist-generated
/lib/codeql/swift/elements/internal/AvailabilitySpecImpl.qll linguist-generated
/lib/codeql/swift/elements/internal/AvailabilitySpecConstructor.qll linguist-generated
/lib/codeql/swift/elements/internal/CommentConstructor.qll linguist-generated
/lib/codeql/swift/elements/internal/DbFileConstructor.qll linguist-generated
/lib/codeql/swift/elements/internal/DbFileImpl.qll linguist-generated
@@ -445,8 +443,6 @@
/lib/codeql/swift/elements/internal/ErrorElementImpl.qll linguist-generated
/lib/codeql/swift/elements/internal/KeyPathComponentConstructor.qll linguist-generated
/lib/codeql/swift/elements/internal/MacroRoleConstructor.qll linguist-generated
/lib/codeql/swift/elements/internal/OtherAvailabilitySpecConstructor.qll linguist-generated
/lib/codeql/swift/elements/internal/PlatformVersionAvailabilitySpecConstructor.qll linguist-generated
/lib/codeql/swift/elements/internal/UnspecifiedElementConstructor.qll linguist-generated
/lib/codeql/swift/elements/pattern/AnyPattern.qll linguist-generated
/lib/codeql/swift/elements/pattern/BindingPattern.qll linguist-generated
@@ -557,6 +553,7 @@
/lib/codeql/swift/elements/type/ElementArchetypeType.qll linguist-generated
/lib/codeql/swift/elements/type/EnumType.qll linguist-generated
/lib/codeql/swift/elements/type/ErrorType.qll linguist-generated
/lib/codeql/swift/elements/type/ExistentialArchetypeType.qll linguist-generated
/lib/codeql/swift/elements/type/ExistentialMetatypeType.qll linguist-generated
/lib/codeql/swift/elements/type/ExistentialType.qll linguist-generated
/lib/codeql/swift/elements/type/FunctionType.qll linguist-generated
@@ -571,7 +568,6 @@
/lib/codeql/swift/elements/type/NominalOrBoundGenericNominalType.qll linguist-generated
/lib/codeql/swift/elements/type/NominalType.qll linguist-generated
/lib/codeql/swift/elements/type/OpaqueTypeArchetypeType.qll linguist-generated
/lib/codeql/swift/elements/type/OpenedArchetypeType.qll linguist-generated
/lib/codeql/swift/elements/type/OptionalType.qll linguist-generated
/lib/codeql/swift/elements/type/PackArchetypeType.qll linguist-generated
/lib/codeql/swift/elements/type/PackElementType.qll linguist-generated
@@ -652,6 +648,8 @@
/lib/codeql/swift/elements/type/internal/EnumTypeImpl.qll linguist-generated
/lib/codeql/swift/elements/type/internal/ErrorTypeConstructor.qll linguist-generated
/lib/codeql/swift/elements/type/internal/ErrorTypeImpl.qll linguist-generated
/lib/codeql/swift/elements/type/internal/ExistentialArchetypeTypeConstructor.qll linguist-generated
/lib/codeql/swift/elements/type/internal/ExistentialArchetypeTypeImpl.qll linguist-generated
/lib/codeql/swift/elements/type/internal/ExistentialMetatypeTypeConstructor.qll linguist-generated
/lib/codeql/swift/elements/type/internal/ExistentialMetatypeTypeImpl.qll linguist-generated
/lib/codeql/swift/elements/type/internal/ExistentialTypeConstructor.qll linguist-generated
@@ -675,8 +673,6 @@
/lib/codeql/swift/elements/type/internal/NominalOrBoundGenericNominalTypeImpl.qll linguist-generated
/lib/codeql/swift/elements/type/internal/OpaqueTypeArchetypeTypeConstructor.qll linguist-generated
/lib/codeql/swift/elements/type/internal/OpaqueTypeArchetypeTypeImpl.qll linguist-generated
/lib/codeql/swift/elements/type/internal/OpenedArchetypeTypeConstructor.qll linguist-generated
/lib/codeql/swift/elements/type/internal/OpenedArchetypeTypeImpl.qll linguist-generated
/lib/codeql/swift/elements/type/internal/OptionalTypeConstructor.qll linguist-generated
/lib/codeql/swift/elements/type/internal/OptionalTypeImpl.qll linguist-generated
/lib/codeql/swift/elements/type/internal/PackArchetypeTypeConstructor.qll linguist-generated
@@ -734,9 +730,7 @@
/lib/codeql/swift/generated/Locatable.qll linguist-generated
/lib/codeql/swift/generated/Location.qll linguist-generated
/lib/codeql/swift/generated/MacroRole.qll linguist-generated
/lib/codeql/swift/generated/OtherAvailabilitySpec.qll linguist-generated
/lib/codeql/swift/generated/ParentChild.qll linguist-generated
/lib/codeql/swift/generated/PlatformVersionAvailabilitySpec.qll linguist-generated
/lib/codeql/swift/generated/PureSynthConstructors.qll linguist-generated
/lib/codeql/swift/generated/Raw.qll linguist-generated
/lib/codeql/swift/generated/Synth.qll linguist-generated
@@ -993,6 +987,7 @@
/lib/codeql/swift/generated/type/ElementArchetypeType.qll linguist-generated
/lib/codeql/swift/generated/type/EnumType.qll linguist-generated
/lib/codeql/swift/generated/type/ErrorType.qll linguist-generated
/lib/codeql/swift/generated/type/ExistentialArchetypeType.qll linguist-generated
/lib/codeql/swift/generated/type/ExistentialMetatypeType.qll linguist-generated
/lib/codeql/swift/generated/type/ExistentialType.qll linguist-generated
/lib/codeql/swift/generated/type/FunctionType.qll linguist-generated
@@ -1007,7 +1002,6 @@
/lib/codeql/swift/generated/type/NominalOrBoundGenericNominalType.qll linguist-generated
/lib/codeql/swift/generated/type/NominalType.qll linguist-generated
/lib/codeql/swift/generated/type/OpaqueTypeArchetypeType.qll linguist-generated
/lib/codeql/swift/generated/type/OpenedArchetypeType.qll linguist-generated
/lib/codeql/swift/generated/type/OptionalType.qll linguist-generated
/lib/codeql/swift/generated/type/PackArchetypeType.qll linguist-generated
/lib/codeql/swift/generated/type/PackElementType.qll linguist-generated
@@ -1035,12 +1029,11 @@
/lib/codeql/swift/generated/type/VariadicSequenceType.qll linguist-generated
/lib/codeql/swift/generated/type/WeakStorageType.qll linguist-generated
/test/extractor-tests/generated/AvailabilityInfo/AvailabilityInfo.ql linguist-generated
/test/extractor-tests/generated/AvailabilitySpec/MISSING_SOURCE.txt linguist-generated
/test/extractor-tests/generated/Comment/MISSING_SOURCE.txt linguist-generated
/test/extractor-tests/generated/Diagnostics/Diagnostics.ql linguist-generated
/test/extractor-tests/generated/File/File.ql linguist-generated
/test/extractor-tests/generated/KeyPathComponent/KeyPathComponent.ql linguist-generated
/test/extractor-tests/generated/OtherAvailabilitySpec/MISSING_SOURCE.txt linguist-generated
/test/extractor-tests/generated/PlatformVersionAvailabilitySpec/MISSING_SOURCE.txt linguist-generated
/test/extractor-tests/generated/decl/Accessor/Accessor.ql linguist-generated
/test/extractor-tests/generated/decl/AssociatedTypeDecl/AssociatedTypeDecl.ql linguist-generated
/test/extractor-tests/generated/decl/CapturedDecl/CapturedDecl.ql linguist-generated
@@ -1190,6 +1183,7 @@
/test/extractor-tests/generated/type/DictionaryType/MISSING_SOURCE.txt linguist-generated
/test/extractor-tests/generated/type/DynamicSelfType/DynamicSelfType.ql linguist-generated
/test/extractor-tests/generated/type/EnumType/MISSING_SOURCE.txt linguist-generated
/test/extractor-tests/generated/type/ExistentialArchetypeType/ExistentialArchetypeType.ql linguist-generated
/test/extractor-tests/generated/type/ExistentialMetatypeType/MISSING_SOURCE.txt linguist-generated
/test/extractor-tests/generated/type/ExistentialType/ExistentialType.ql linguist-generated
/test/extractor-tests/generated/type/FunctionType/MISSING_SOURCE.txt linguist-generated
@@ -1201,7 +1195,6 @@
/test/extractor-tests/generated/type/MetatypeType/MISSING_SOURCE.txt linguist-generated
/test/extractor-tests/generated/type/ModuleType/ModuleType.ql linguist-generated
/test/extractor-tests/generated/type/OpaqueTypeArchetypeType/OpaqueTypeArchetypeType.ql linguist-generated
/test/extractor-tests/generated/type/OpenedArchetypeType/OpenedArchetypeType.ql linguist-generated
/test/extractor-tests/generated/type/OptionalType/MISSING_SOURCE.txt linguist-generated
/test/extractor-tests/generated/type/PackType/ElementArchetypeType.ql linguist-generated
/test/extractor-tests/generated/type/PackType/PackArchetypeType.ql linguist-generated

View File

@@ -0,0 +1,3 @@
| Package.swift:0:0:0:0 | Package.swift |
| Sources/hello-world/hello_world.swift:0:0:0:0 | Sources/hello-world/hello_world.swift |
| file://:0:0:0:0 | |

View File

@@ -3,6 +3,7 @@ import pytest
@runs_on.macos
@pytest.mark.ql_test("DB-CHECK", xfail=True)
@pytest.mark.ql_test("DB-CHECK", xfail=not runs_on.macos_26)
@pytest.mark.ql_test("*", expected=f"{'.macos_26' if runs_on.macos_26 else ''}.expected")
def test(codeql, swift):
codeql.database.create()

View File

@@ -2,6 +2,8 @@
| Builtin.Executor | BuiltinExecutorType |
| Builtin.FPIEEE32 | BuiltinFloatType |
| Builtin.FPIEEE64 | BuiltinFloatType |
| Builtin.FixedArray<\u03c4_0_0, \u03c4_0_1> | BuiltinFixedArrayType |
| Builtin.FixedArray<count, Element> | BuiltinFixedArrayType |
| Builtin.Int1 | BuiltinIntegerType |
| Builtin.Int8 | BuiltinIntegerType |
| Builtin.Int16 | BuiltinIntegerType |

View File

@@ -0,0 +1,6 @@
---
category: breaking
---
* The `OpenedArchetypeType` class has been renamed as `ExistentialArchetypeType`.
* The `OtherAvailabilitySpec` class has been removed. Use `AvailabilitySpec::isWildcard` instead.
* The `PlatformVersionAvailabilitySpec` has been removed. Use `AvailabilitySpec::getPlatform` and `AvailabilitySpec::getVersion` instead.

View File

@@ -0,0 +1,4 @@
---
category: majorAnalysis
---
* Upgraded to allow analysis of Swift 6.2.

View File

@@ -18,8 +18,6 @@ import codeql.swift.elements.KeyPathComponent
import codeql.swift.elements.Locatable
import codeql.swift.elements.Location
import codeql.swift.elements.MacroRole
import codeql.swift.elements.OtherAvailabilitySpec
import codeql.swift.elements.PlatformVersionAvailabilitySpec
import codeql.swift.elements.UnknownFile
import codeql.swift.elements.UnknownLocation
import codeql.swift.elements.UnspecifiedElement
@@ -268,6 +266,7 @@ import codeql.swift.elements.type.DynamicSelfType
import codeql.swift.elements.type.ElementArchetypeType
import codeql.swift.elements.type.EnumType
import codeql.swift.elements.type.ErrorType
import codeql.swift.elements.type.ExistentialArchetypeType
import codeql.swift.elements.type.ExistentialMetatypeType
import codeql.swift.elements.type.ExistentialType
import codeql.swift.elements.type.FunctionType
@@ -282,7 +281,6 @@ import codeql.swift.elements.type.ModuleType
import codeql.swift.elements.type.NominalOrBoundGenericNominalType
import codeql.swift.elements.type.NominalType
import codeql.swift.elements.type.OpaqueTypeArchetypeType
import codeql.swift.elements.type.OpenedArchetypeType
import codeql.swift.elements.type.OptionalType
import codeql.swift.elements.type.PackArchetypeType
import codeql.swift.elements.type.PackElementType

View File

@@ -1,12 +0,0 @@
// generated by codegen/codegen.py, do not edit
/**
* This module provides the public class `OtherAvailabilitySpec`.
*/
private import internal.OtherAvailabilitySpecImpl
import codeql.swift.elements.AvailabilitySpec
/**
* A wildcard availability spec `*`
*/
final class OtherAvailabilitySpec = Impl::OtherAvailabilitySpec;

View File

@@ -1,12 +0,0 @@
// generated by codegen/codegen.py, do not edit
/**
* This module provides the public class `PlatformVersionAvailabilitySpec`.
*/
private import internal.PlatformVersionAvailabilitySpecImpl
import codeql.swift.elements.AvailabilitySpec
/**
* An availability spec based on platform and version, for example `macOS 12` or `watchOS 14`
*/
final class PlatformVersionAvailabilitySpec = Impl::PlatformVersionAvailabilitySpec;

View File

@@ -1,14 +1,14 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
/**
* This module defines the hook used internally to tweak the characteristic predicate of
* `OpenedArchetypeType` synthesized instances.
* `AvailabilitySpec` synthesized instances.
* INTERNAL: Do not use.
*/
private import codeql.swift.generated.Raw
/**
* The characteristic predicate of `OpenedArchetypeType` synthesized instances.
* The characteristic predicate of `AvailabilitySpec` synthesized instances.
* INTERNAL: Do not use.
*/
predicate constructOpenedArchetypeType(Raw::OpenedArchetypeType id) { any() }
predicate constructAvailabilitySpec(Raw::AvailabilitySpec id) { any() }

View File

@@ -1,10 +1,3 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
/**
* This module provides a hand-modifiable wrapper around the generated class `AvailabilitySpec`.
*
* INTERNAL: Do not use.
*/
private import codeql.swift.generated.AvailabilitySpec
/**
@@ -12,11 +5,18 @@ private import codeql.swift.generated.AvailabilitySpec
* be referenced directly.
*/
module Impl {
// the following QLdoc is generated: if you need to edit it, do it in the schema file
/**
* An availability spec, that is, part of an `AvailabilityInfo` condition. For example `iOS 12` and `*` in:
* ```
* if #available(iOS 12, *)
* ```
*/
class AvailabilitySpec extends Generated::AvailabilitySpec { }
class AvailabilitySpec extends Generated::AvailabilitySpec {
override string toStringImpl() {
if this.isWildcard()
then result = "*"
else result = this.getPlatform() + " " + this.getVersion()
}
}
}

View File

@@ -10,37 +10,37 @@ module Impl {
/**
* Property access like `.bar` in `\Foo.bar`.
*/
predicate isProperty() { this.getKind() = 3 }
predicate isProperty() { this.getKind() = 5 }
/**
* Array or dictionary subscript like `[1]` or `["a", "b"]`.
*/
predicate isSubscript() { this.getKind() = 4 }
predicate isSubscript() { this.getKind() = 6 }
/**
* Optional forcing `!`.
*/
predicate isOptionalForcing() { this.getKind() = 5 }
predicate isOptionalForcing() { this.getKind() = 7 }
/**
* Optional chaining `?`.
*/
predicate isOptionalChaining() { this.getKind() = 6 }
predicate isOptionalChaining() { this.getKind() = 8 }
/**
* Implicit optional wrapping component inserted by the compiler when an optional chain ends in a non-optional value.
*/
predicate isOptionalWrapping() { this.getKind() = 7 }
predicate isOptionalWrapping() { this.getKind() = 9 }
/**
* Reference to the entire object; the `self` in `\Foo.self`.
*/
predicate isSelf() { this.getKind() = 8 }
predicate isSelf() { this.getKind() = 10 }
/**
* Tuple indexing like `.1`.
*/
predicate isTupleIndexing() { this.getKind() = 9 }
predicate isTupleIndexing() { this.getKind() = 11 }
/** Gets the underlying key-path expression which this is a component of. */
KeyPathExpr getKeyPathExpr() { result.getAComponent() = this }

View File

@@ -1,11 +0,0 @@
private import codeql.swift.generated.OtherAvailabilitySpec
module Impl {
// the following QLdoc is generated: if you need to edit it, do it in the schema file
/**
* A wildcard availability spec `*`
*/
class OtherAvailabilitySpec extends Generated::OtherAvailabilitySpec {
override string toStringImpl() { result = "*" }
}
}

View File

@@ -1,16 +0,0 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
/**
* This module defines the hook used internally to tweak the characteristic predicate of
* `PlatformVersionAvailabilitySpec` synthesized instances.
* INTERNAL: Do not use.
*/
private import codeql.swift.generated.Raw
/**
* The characteristic predicate of `PlatformVersionAvailabilitySpec` synthesized instances.
* INTERNAL: Do not use.
*/
predicate constructPlatformVersionAvailabilitySpec(Raw::PlatformVersionAvailabilitySpec id) {
any()
}

View File

@@ -1,11 +0,0 @@
private import codeql.swift.generated.PlatformVersionAvailabilitySpec
module Impl {
// the following QLdoc is generated: if you need to edit it, do it in the schema file
/**
* An availability spec based on platform and version, for example `macOS 12` or `watchOS 14`
*/
class PlatformVersionAvailabilitySpec extends Generated::PlatformVersionAvailabilitySpec {
override string toStringImpl() { result = this.getPlatform() + " " + this.getVersion() }
}
}

View File

@@ -0,0 +1,9 @@
// generated by codegen/codegen.py, do not edit
/**
* This module provides the public class `ExistentialArchetypeType`.
*/
private import internal.ExistentialArchetypeTypeImpl
import codeql.swift.elements.type.LocalArchetypeType
final class ExistentialArchetypeType = Impl::ExistentialArchetypeType;

View File

@@ -1,9 +0,0 @@
// generated by codegen/codegen.py, do not edit
/**
* This module provides the public class `OpenedArchetypeType`.
*/
private import internal.OpenedArchetypeTypeImpl
import codeql.swift.elements.type.LocalArchetypeType
final class OpenedArchetypeType = Impl::OpenedArchetypeType;

View File

@@ -1,14 +1,14 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
/**
* This module defines the hook used internally to tweak the characteristic predicate of
* `OtherAvailabilitySpec` synthesized instances.
* `ExistentialArchetypeType` synthesized instances.
* INTERNAL: Do not use.
*/
private import codeql.swift.generated.Raw
/**
* The characteristic predicate of `OtherAvailabilitySpec` synthesized instances.
* The characteristic predicate of `ExistentialArchetypeType` synthesized instances.
* INTERNAL: Do not use.
*/
predicate constructOtherAvailabilitySpec(Raw::OtherAvailabilitySpec id) { any() }
predicate constructExistentialArchetypeType(Raw::ExistentialArchetypeType id) { any() }

View File

@@ -1,16 +1,16 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
/**
* This module provides a hand-modifiable wrapper around the generated class `OpenedArchetypeType`.
* This module provides a hand-modifiable wrapper around the generated class `ExistentialArchetypeType`.
*
* INTERNAL: Do not use.
*/
private import codeql.swift.generated.type.OpenedArchetypeType
private import codeql.swift.generated.type.ExistentialArchetypeType
/**
* INTERNAL: This module contains the customizable definition of `OpenedArchetypeType` and should not
* INTERNAL: This module contains the customizable definition of `ExistentialArchetypeType` and should not
* be referenced directly.
*/
module Impl {
class OpenedArchetypeType extends Generated::OpenedArchetypeType { }
class ExistentialArchetypeType extends Generated::ExistentialArchetypeType { }
}

View File

@@ -21,5 +21,38 @@ module Generated {
* INTERNAL: Do not reference the `Generated::AvailabilitySpec` class directly.
* Use the subclass `AvailabilitySpec`, where the following predicates are available.
*/
class AvailabilitySpec extends Synth::TAvailabilitySpec, AstNodeImpl::AstNode { }
class AvailabilitySpec extends Synth::TAvailabilitySpec, AstNodeImpl::AstNode {
override string getAPrimaryQlClass() { result = "AvailabilitySpec" }
/**
* Gets the platform of this availability spec, if it exists.
*/
string getPlatform() {
result = Synth::convertAvailabilitySpecToRaw(this).(Raw::AvailabilitySpec).getPlatform()
}
/**
* Holds if `getPlatform()` exists.
*/
final predicate hasPlatform() { exists(this.getPlatform()) }
/**
* Gets the version of this availability spec, if it exists.
*/
string getVersion() {
result = Synth::convertAvailabilitySpecToRaw(this).(Raw::AvailabilitySpec).getVersion()
}
/**
* Holds if `getVersion()` exists.
*/
final predicate hasVersion() { exists(this.getVersion()) }
/**
* Holds if this availability spec is wildcard.
*/
predicate isWildcard() {
Synth::convertAvailabilitySpecToRaw(this).(Raw::AvailabilitySpec).isWildcard()
}
}
}

View File

@@ -29,12 +29,14 @@ module Generated {
*
* INTERNAL: Do not use.
*
* This is 3 for properties, 4 for array and dictionary subscripts, 5 for optional forcing
* (`!`), 6 for optional chaining (`?`), 7 for implicit optional wrapping, 8 for `self`,
* and 9 for tuple element indexing.
* TODO: Swift 6.2 update with UnresolvedApply and Apply
*
* The following values should not appear: 0 for invalid components, 1 for unresolved
* properties, 2 for unresolved subscripts, 10 for #keyPath dictionary keys, and 11 for
* This is 5 for properties, 6 for array and dictionary subscripts, 7 for optional forcing
* (`!`), 8 for optional chaining (`?`), 9 for implicit optional wrapping, 10 for `self`,
* and 11 for tuple element indexing.
*
* The following values should not appear: 0 for invalid components, 2 for unresolved
* properties, 3 for unresolved subscripts, 12 for #keyPath dictionary keys, and 13 for
* implicit IDE code completion data.
*/
int getKind() {

View File

@@ -1,26 +0,0 @@
// generated by codegen/codegen.py, do not edit
/**
* This module provides the generated definition of `OtherAvailabilitySpec`.
* INTERNAL: Do not import directly.
*/
private import codeql.swift.generated.Synth
private import codeql.swift.generated.Raw
import codeql.swift.elements.internal.AvailabilitySpecImpl::Impl as AvailabilitySpecImpl
/**
* INTERNAL: This module contains the fully generated definition of `OtherAvailabilitySpec` and should not
* be referenced directly.
*/
module Generated {
/**
* A wildcard availability spec `*`
* INTERNAL: Do not reference the `Generated::OtherAvailabilitySpec` class directly.
* Use the subclass `OtherAvailabilitySpec`, where the following predicates are available.
*/
class OtherAvailabilitySpec extends Synth::TOtherAvailabilitySpec,
AvailabilitySpecImpl::AvailabilitySpec
{
override string getAPrimaryQlClass() { result = "OtherAvailabilitySpec" }
}
}

View File

@@ -55,6 +55,12 @@ private module Impl {
)
}
private Element getImmediateChildOfAvailabilitySpec(
AvailabilitySpec e, int index, string partialPredicateCall
) {
none()
}
private Element getImmediateChildOfKeyPathComponent(
KeyPathComponent e, int index, string partialPredicateCall
) {
@@ -89,18 +95,6 @@ private module Impl {
)
}
private Element getImmediateChildOfOtherAvailabilitySpec(
OtherAvailabilitySpec e, int index, string partialPredicateCall
) {
none()
}
private Element getImmediateChildOfPlatformVersionAvailabilitySpec(
PlatformVersionAvailabilitySpec e, int index, string partialPredicateCall
) {
none()
}
private Element getImmediateChildOfCapturedDecl(
CapturedDecl e, int index, string partialPredicateCall
) {
@@ -3140,8 +3134,8 @@ private module Impl {
none()
}
private Element getImmediateChildOfOpenedArchetypeType(
OpenedArchetypeType e, int index, string partialPredicateCall
private Element getImmediateChildOfExistentialArchetypeType(
ExistentialArchetypeType e, int index, string partialPredicateCall
) {
none()
}
@@ -3188,16 +3182,14 @@ private module Impl {
or
result = getImmediateChildOfAvailabilityInfo(e, index, partialAccessor)
or
result = getImmediateChildOfAvailabilitySpec(e, index, partialAccessor)
or
result = getImmediateChildOfKeyPathComponent(e, index, partialAccessor)
or
result = getImmediateChildOfMacroRole(e, index, partialAccessor)
or
result = getImmediateChildOfUnspecifiedElement(e, index, partialAccessor)
or
result = getImmediateChildOfOtherAvailabilitySpec(e, index, partialAccessor)
or
result = getImmediateChildOfPlatformVersionAvailabilitySpec(e, index, partialAccessor)
or
result = getImmediateChildOfCapturedDecl(e, index, partialAccessor)
or
result = getImmediateChildOfEnumCaseDecl(e, index, partialAccessor)
@@ -3674,7 +3666,7 @@ private module Impl {
or
result = getImmediateChildOfEnumType(e, index, partialAccessor)
or
result = getImmediateChildOfOpenedArchetypeType(e, index, partialAccessor)
result = getImmediateChildOfExistentialArchetypeType(e, index, partialAccessor)
or
result = getImmediateChildOfOptionalType(e, index, partialAccessor)
or

View File

@@ -1,46 +0,0 @@
// generated by codegen/codegen.py, do not edit
/**
* This module provides the generated definition of `PlatformVersionAvailabilitySpec`.
* INTERNAL: Do not import directly.
*/
private import codeql.swift.generated.Synth
private import codeql.swift.generated.Raw
import codeql.swift.elements.internal.AvailabilitySpecImpl::Impl as AvailabilitySpecImpl
/**
* INTERNAL: This module contains the fully generated definition of `PlatformVersionAvailabilitySpec` and should not
* be referenced directly.
*/
module Generated {
/**
* An availability spec based on platform and version, for example `macOS 12` or `watchOS 14`
* INTERNAL: Do not reference the `Generated::PlatformVersionAvailabilitySpec` class directly.
* Use the subclass `PlatformVersionAvailabilitySpec`, where the following predicates are available.
*/
class PlatformVersionAvailabilitySpec extends Synth::TPlatformVersionAvailabilitySpec,
AvailabilitySpecImpl::AvailabilitySpec
{
override string getAPrimaryQlClass() { result = "PlatformVersionAvailabilitySpec" }
/**
* Gets the platform of this platform version availability spec.
*/
string getPlatform() {
result =
Synth::convertPlatformVersionAvailabilitySpecToRaw(this)
.(Raw::PlatformVersionAvailabilitySpec)
.getPlatform()
}
/**
* Gets the version of this platform version availability spec.
*/
string getVersion() {
result =
Synth::convertPlatformVersionAvailabilitySpecToRaw(this)
.(Raw::PlatformVersionAvailabilitySpec)
.getVersion()
}
}
}

View File

@@ -161,7 +161,24 @@ module Raw {
* if #available(iOS 12, *)
* ```
*/
class AvailabilitySpec extends @availability_spec, AstNode { }
class AvailabilitySpec extends @availability_spec, AstNode {
override string toString() { result = "AvailabilitySpec" }
/**
* Gets the platform of this availability spec, if it exists.
*/
string getPlatform() { availability_spec_platforms(this, result) }
/**
* Gets the version of this availability spec, if it exists.
*/
string getVersion() { availability_spec_versions(this, result) }
/**
* Holds if this availability spec is wildcard.
*/
predicate isWildcard() { availability_spec_is_wildcard(this) }
}
/**
* INTERNAL: Do not use.
@@ -209,12 +226,14 @@ module Raw {
*
* INTERNAL: Do not use.
*
* This is 3 for properties, 4 for array and dictionary subscripts, 5 for optional forcing
* (`!`), 6 for optional chaining (`?`), 7 for implicit optional wrapping, 8 for `self`,
* and 9 for tuple element indexing.
* TODO: Swift 6.2 update with UnresolvedApply and Apply
*
* The following values should not appear: 0 for invalid components, 1 for unresolved
* properties, 2 for unresolved subscripts, 10 for #keyPath dictionary keys, and 11 for
* This is 5 for properties, 6 for array and dictionary subscripts, 7 for optional forcing
* (`!`), 8 for optional chaining (`?`), 9 for implicit optional wrapping, 10 for `self`,
* and 11 for tuple element indexing.
*
* The following values should not appear: 0 for invalid components, 2 for unresolved
* properties, 3 for unresolved subscripts, 12 for #keyPath dictionary keys, and 13 for
* implicit IDE code completion data.
*/
int getKind() { key_path_components(this, result, _) }
@@ -308,34 +327,6 @@ module Raw {
AstNode getChild(int index) { unspecified_element_children(this, index, result) }
}
/**
* INTERNAL: Do not use.
* A wildcard availability spec `*`
*/
class OtherAvailabilitySpec extends @other_availability_spec, AvailabilitySpec {
override string toString() { result = "OtherAvailabilitySpec" }
}
/**
* INTERNAL: Do not use.
* An availability spec based on platform and version, for example `macOS 12` or `watchOS 14`
*/
class PlatformVersionAvailabilitySpec extends @platform_version_availability_spec,
AvailabilitySpec
{
override string toString() { result = "PlatformVersionAvailabilitySpec" }
/**
* Gets the platform of this platform version availability spec.
*/
string getPlatform() { platform_version_availability_specs(this, result, _) }
/**
* Gets the version of this platform version availability spec.
*/
string getVersion() { platform_version_availability_specs(this, _, result) }
}
/**
* INTERNAL: Do not use.
*/
@@ -3859,8 +3850,8 @@ module Raw {
/**
* INTERNAL: Do not use.
*/
class OpenedArchetypeType extends @opened_archetype_type, LocalArchetypeType {
override string toString() { result = "OpenedArchetypeType" }
class ExistentialArchetypeType extends @existential_archetype_type, LocalArchetypeType {
override string toString() { result = "ExistentialArchetypeType" }
}
/**

View File

@@ -18,6 +18,10 @@ module Synth {
* INTERNAL: Do not use.
*/
TAvailabilityInfo(Raw::AvailabilityInfo id) { constructAvailabilityInfo(id) } or
/**
* INTERNAL: Do not use.
*/
TAvailabilitySpec(Raw::AvailabilitySpec id) { constructAvailabilitySpec(id) } or
/**
* INTERNAL: Do not use.
*/
@@ -42,16 +46,6 @@ module Synth {
* INTERNAL: Do not use.
*/
TMacroRole(Raw::MacroRole id) { constructMacroRole(id) } or
/**
* INTERNAL: Do not use.
*/
TOtherAvailabilitySpec(Raw::OtherAvailabilitySpec id) { constructOtherAvailabilitySpec(id) } or
/**
* INTERNAL: Do not use.
*/
TPlatformVersionAvailabilitySpec(Raw::PlatformVersionAvailabilitySpec id) {
constructPlatformVersionAvailabilitySpec(id)
} or
/**
* INTERNAL: Do not use.
*/
@@ -976,6 +970,12 @@ module Synth {
* INTERNAL: Do not use.
*/
TErrorType(Raw::ErrorType id) { constructErrorType(id) } or
/**
* INTERNAL: Do not use.
*/
TExistentialArchetypeType(Raw::ExistentialArchetypeType id) {
constructExistentialArchetypeType(id)
} or
/**
* INTERNAL: Do not use.
*/
@@ -1024,10 +1024,6 @@ module Synth {
TOpaqueTypeArchetypeType(Raw::OpaqueTypeArchetypeType id) {
constructOpaqueTypeArchetypeType(id)
} or
/**
* INTERNAL: Do not use.
*/
TOpenedArchetypeType(Raw::OpenedArchetypeType id) { constructOpenedArchetypeType(id) } or
/**
* INTERNAL: Do not use.
*/
@@ -1121,11 +1117,6 @@ module Synth {
TDecl or TExpr or TKeyPathComponent or TMacroRole or TPattern or TStmt or TStmtCondition or
TTypeRepr;
/**
* INTERNAL: Do not use.
*/
class TAvailabilitySpec = TOtherAvailabilitySpec or TPlatformVersionAvailabilitySpec;
/**
* INTERNAL: Do not use.
*/
@@ -1400,7 +1391,7 @@ module Synth {
/**
* INTERNAL: Do not use.
*/
class TLocalArchetypeType = TElementArchetypeType or TOpenedArchetypeType;
class TLocalArchetypeType = TElementArchetypeType or TExistentialArchetypeType;
/**
* INTERNAL: Do not use.
@@ -1453,6 +1444,12 @@ module Synth {
*/
TAvailabilityInfo convertAvailabilityInfoFromRaw(Raw::Element e) { result = TAvailabilityInfo(e) }
/**
* INTERNAL: Do not use.
* Converts a raw element to a synthesized `TAvailabilitySpec`, if possible.
*/
TAvailabilitySpec convertAvailabilitySpecFromRaw(Raw::Element e) { result = TAvailabilitySpec(e) }
/**
* INTERNAL: Do not use.
* Converts a raw element to a synthesized `TComment`, if possible.
@@ -1489,22 +1486,6 @@ module Synth {
*/
TMacroRole convertMacroRoleFromRaw(Raw::Element e) { result = TMacroRole(e) }
/**
* INTERNAL: Do not use.
* Converts a raw element to a synthesized `TOtherAvailabilitySpec`, if possible.
*/
TOtherAvailabilitySpec convertOtherAvailabilitySpecFromRaw(Raw::Element e) {
result = TOtherAvailabilitySpec(e)
}
/**
* INTERNAL: Do not use.
* Converts a raw element to a synthesized `TPlatformVersionAvailabilitySpec`, if possible.
*/
TPlatformVersionAvailabilitySpec convertPlatformVersionAvailabilitySpecFromRaw(Raw::Element e) {
result = TPlatformVersionAvailabilitySpec(e)
}
/**
* INTERNAL: Do not use.
* Converts a raw element to a synthesized `TUnknownFile`, if possible.
@@ -2987,6 +2968,14 @@ module Synth {
*/
TErrorType convertErrorTypeFromRaw(Raw::Element e) { result = TErrorType(e) }
/**
* INTERNAL: Do not use.
* Converts a raw element to a synthesized `TExistentialArchetypeType`, if possible.
*/
TExistentialArchetypeType convertExistentialArchetypeTypeFromRaw(Raw::Element e) {
result = TExistentialArchetypeType(e)
}
/**
* INTERNAL: Do not use.
* Converts a raw element to a synthesized `TExistentialMetatypeType`, if possible.
@@ -3061,14 +3050,6 @@ module Synth {
result = TOpaqueTypeArchetypeType(e)
}
/**
* INTERNAL: Do not use.
* Converts a raw element to a synthesized `TOpenedArchetypeType`, if possible.
*/
TOpenedArchetypeType convertOpenedArchetypeTypeFromRaw(Raw::Element e) {
result = TOpenedArchetypeType(e)
}
/**
* INTERNAL: Do not use.
* Converts a raw element to a synthesized `TOptionalType`, if possible.
@@ -3239,16 +3220,6 @@ module Synth {
result = convertTypeReprFromRaw(e)
}
/**
* INTERNAL: Do not use.
* Converts a raw DB element to a synthesized `TAvailabilitySpec`, if possible.
*/
TAvailabilitySpec convertAvailabilitySpecFromRaw(Raw::Element e) {
result = convertOtherAvailabilitySpecFromRaw(e)
or
result = convertPlatformVersionAvailabilitySpecFromRaw(e)
}
/**
* INTERNAL: Do not use.
* Converts a raw DB element to a synthesized `TCallable`, if possible.
@@ -4058,7 +4029,7 @@ module Synth {
TLocalArchetypeType convertLocalArchetypeTypeFromRaw(Raw::Element e) {
result = convertElementArchetypeTypeFromRaw(e)
or
result = convertOpenedArchetypeTypeFromRaw(e)
result = convertExistentialArchetypeTypeFromRaw(e)
}
/**
@@ -4197,6 +4168,12 @@ module Synth {
*/
Raw::Element convertAvailabilityInfoToRaw(TAvailabilityInfo e) { e = TAvailabilityInfo(result) }
/**
* INTERNAL: Do not use.
* Converts a synthesized `TAvailabilitySpec` to a raw DB element, if possible.
*/
Raw::Element convertAvailabilitySpecToRaw(TAvailabilitySpec e) { e = TAvailabilitySpec(result) }
/**
* INTERNAL: Do not use.
* Converts a synthesized `TComment` to a raw DB element, if possible.
@@ -4233,22 +4210,6 @@ module Synth {
*/
Raw::Element convertMacroRoleToRaw(TMacroRole e) { e = TMacroRole(result) }
/**
* INTERNAL: Do not use.
* Converts a synthesized `TOtherAvailabilitySpec` to a raw DB element, if possible.
*/
Raw::Element convertOtherAvailabilitySpecToRaw(TOtherAvailabilitySpec e) {
e = TOtherAvailabilitySpec(result)
}
/**
* INTERNAL: Do not use.
* Converts a synthesized `TPlatformVersionAvailabilitySpec` to a raw DB element, if possible.
*/
Raw::Element convertPlatformVersionAvailabilitySpecToRaw(TPlatformVersionAvailabilitySpec e) {
e = TPlatformVersionAvailabilitySpec(result)
}
/**
* INTERNAL: Do not use.
* Converts a synthesized `TUnknownFile` to a raw DB element, if possible.
@@ -5729,6 +5690,14 @@ module Synth {
*/
Raw::Element convertErrorTypeToRaw(TErrorType e) { e = TErrorType(result) }
/**
* INTERNAL: Do not use.
* Converts a synthesized `TExistentialArchetypeType` to a raw DB element, if possible.
*/
Raw::Element convertExistentialArchetypeTypeToRaw(TExistentialArchetypeType e) {
e = TExistentialArchetypeType(result)
}
/**
* INTERNAL: Do not use.
* Converts a synthesized `TExistentialMetatypeType` to a raw DB element, if possible.
@@ -5803,14 +5772,6 @@ module Synth {
e = TOpaqueTypeArchetypeType(result)
}
/**
* INTERNAL: Do not use.
* Converts a synthesized `TOpenedArchetypeType` to a raw DB element, if possible.
*/
Raw::Element convertOpenedArchetypeTypeToRaw(TOpenedArchetypeType e) {
e = TOpenedArchetypeType(result)
}
/**
* INTERNAL: Do not use.
* Converts a synthesized `TOptionalType` to a raw DB element, if possible.
@@ -5981,16 +5942,6 @@ module Synth {
result = convertTypeReprToRaw(e)
}
/**
* INTERNAL: Do not use.
* Converts a synthesized `TAvailabilitySpec` to a raw DB element, if possible.
*/
Raw::Element convertAvailabilitySpecToRaw(TAvailabilitySpec e) {
result = convertOtherAvailabilitySpecToRaw(e)
or
result = convertPlatformVersionAvailabilitySpecToRaw(e)
}
/**
* INTERNAL: Do not use.
* Converts a synthesized `TCallable` to a raw DB element, if possible.
@@ -6800,7 +6751,7 @@ module Synth {
Raw::Element convertLocalArchetypeTypeToRaw(TLocalArchetypeType e) {
result = convertElementArchetypeTypeToRaw(e)
or
result = convertOpenedArchetypeTypeToRaw(e)
result = convertExistentialArchetypeTypeToRaw(e)
}
/**

View File

@@ -4,14 +4,13 @@
*/
import codeql.swift.elements.internal.AvailabilityInfoConstructor
import codeql.swift.elements.internal.AvailabilitySpecConstructor
import codeql.swift.elements.internal.CommentConstructor
import codeql.swift.elements.internal.DbFileConstructor
import codeql.swift.elements.internal.DbLocationConstructor
import codeql.swift.elements.internal.DiagnosticsConstructor
import codeql.swift.elements.internal.KeyPathComponentConstructor
import codeql.swift.elements.internal.MacroRoleConstructor
import codeql.swift.elements.internal.OtherAvailabilitySpecConstructor
import codeql.swift.elements.internal.PlatformVersionAvailabilitySpecConstructor
import codeql.swift.elements.internal.UnspecifiedElementConstructor
import codeql.swift.elements.decl.internal.AccessorConstructor
import codeql.swift.elements.decl.internal.AssociatedTypeDeclConstructor
@@ -224,6 +223,7 @@ import codeql.swift.elements.type.internal.DynamicSelfTypeConstructor
import codeql.swift.elements.type.internal.ElementArchetypeTypeConstructor
import codeql.swift.elements.type.internal.EnumTypeConstructor
import codeql.swift.elements.type.internal.ErrorTypeConstructor
import codeql.swift.elements.type.internal.ExistentialArchetypeTypeConstructor
import codeql.swift.elements.type.internal.ExistentialMetatypeTypeConstructor
import codeql.swift.elements.type.internal.ExistentialTypeConstructor
import codeql.swift.elements.type.internal.FunctionTypeConstructor
@@ -235,7 +235,6 @@ import codeql.swift.elements.type.internal.LValueTypeConstructor
import codeql.swift.elements.type.internal.MetatypeTypeConstructor
import codeql.swift.elements.type.internal.ModuleTypeConstructor
import codeql.swift.elements.type.internal.OpaqueTypeArchetypeTypeConstructor
import codeql.swift.elements.type.internal.OpenedArchetypeTypeConstructor
import codeql.swift.elements.type.internal.OptionalTypeConstructor
import codeql.swift.elements.type.internal.PackArchetypeTypeConstructor
import codeql.swift.elements.type.internal.PackElementTypeConstructor

View File

@@ -0,0 +1,25 @@
// generated by codegen/codegen.py, do not edit
/**
* This module provides the generated definition of `ExistentialArchetypeType`.
* INTERNAL: Do not import directly.
*/
private import codeql.swift.generated.Synth
private import codeql.swift.generated.Raw
import codeql.swift.elements.type.internal.LocalArchetypeTypeImpl::Impl as LocalArchetypeTypeImpl
/**
* INTERNAL: This module contains the fully generated definition of `ExistentialArchetypeType` and should not
* be referenced directly.
*/
module Generated {
/**
* INTERNAL: Do not reference the `Generated::ExistentialArchetypeType` class directly.
* Use the subclass `ExistentialArchetypeType`, where the following predicates are available.
*/
class ExistentialArchetypeType extends Synth::TExistentialArchetypeType,
LocalArchetypeTypeImpl::LocalArchetypeType
{
override string getAPrimaryQlClass() { result = "ExistentialArchetypeType" }
}
}

View File

@@ -1,25 +0,0 @@
// generated by codegen/codegen.py, do not edit
/**
* This module provides the generated definition of `OpenedArchetypeType`.
* INTERNAL: Do not import directly.
*/
private import codeql.swift.generated.Synth
private import codeql.swift.generated.Raw
import codeql.swift.elements.type.internal.LocalArchetypeTypeImpl::Impl as LocalArchetypeTypeImpl
/**
* INTERNAL: This module contains the fully generated definition of `OpenedArchetypeType` and should not
* be referenced directly.
*/
module Generated {
/**
* INTERNAL: Do not reference the `Generated::OpenedArchetypeType` class directly.
* Use the subclass `OpenedArchetypeType`, where the following predicates are available.
*/
class OpenedArchetypeType extends Synth::TOpenedArchetypeType,
LocalArchetypeTypeImpl::LocalArchetypeType
{
override string getAPrimaryQlClass() { result = "OpenedArchetypeType" }
}
}

View File

@@ -133,10 +133,26 @@ availability_info_specs(
int spec: @availability_spec_or_none ref
);
@availability_spec =
@other_availability_spec
| @platform_version_availability_spec
;
availability_specs(
unique int id: @availability_spec
);
#keyset[id]
availability_spec_platforms(
int id: @availability_spec ref,
string platform: string ref
);
#keyset[id]
availability_spec_versions(
int id: @availability_spec ref,
string version: string ref
);
#keyset[id]
availability_spec_is_wildcard(
int id: @availability_spec ref
);
@callable =
@closure_expr
@@ -245,16 +261,6 @@ unspecified_element_children(
int child: @ast_node_or_none ref
);
other_availability_specs(
unique int id: @other_availability_spec
);
platform_version_availability_specs(
unique int id: @platform_version_availability_spec,
string platform: string ref,
string version: string ref
);
@decl =
@captured_decl
| @enum_case_decl
@@ -2533,7 +2539,7 @@ dictionary_types( //dir=type
@local_archetype_type =
@element_archetype_type
| @opened_archetype_type
| @existential_archetype_type
;
@nominal_type =
@@ -2596,8 +2602,8 @@ enum_types( //dir=type
unique int id: @enum_type
);
opened_archetype_types( //dir=type
unique int id: @opened_archetype_type
existential_archetype_types( //dir=type
unique int id: @existential_archetype_type
);
optional_types( //dir=type

View File

@@ -0,0 +1,21 @@
class AvailabilitySpec extends @availability_spec {
string toString() { none() }
}
query predicate new_availability_specs(AvailabilitySpec id) {
platform_version_availability_specs(id, _, _)
or
other_availability_specs(id)
}
query predicate new_availability_spec_platforms(AvailabilitySpec id, string platform) {
platform_version_availability_specs(id, platform, _)
}
query predicate new_availability_spec_versions(AvailabilitySpec id, string version) {
platform_version_availability_specs(id, _, version)
}
query predicate new_availability_spec_is_wildcard(AvailabilitySpec id) {
other_availability_specs(id)
}

View File

@@ -0,0 +1,7 @@
class OpenedArchetypeType extends @opened_archetype_type {
string toString() { none() }
}
from OpenedArchetypeType id
where opened_archetype_types(id)
select id

View File

@@ -0,0 +1,13 @@
class KeyPathComponent extends @key_path_component {
string toString() { none() }
}
class TypeOrNone extends @type_or_none {
string toString() { none() }
}
from KeyPathComponent id, int kind, int new_kind, TypeOrNone component_type
where
key_path_components(id, kind, component_type) and
if kind < 3 then new_kind = kind else new_kind = kind + 2
select id, new_kind, component_type

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
description: Upgrade to Swift 6.2
compatibility: full
availability_specs.rel: run availability_specs.qlo new_availability_specs
availability_spec_platforms.rel: run availability_specs.qlo new_availability_spec_platforms
availability_spec_versions.rel: run availability_specs.qlo new_availability_spec_versions
availability_spec_is_wildcard.rel: run availability_specs.qlo new_availability_spec_is_wildcard
existential_archetype_types.rel: run existential_archetype_types.qlo
key_path_components.rel: run key_path_components.qlo
opened_archetype_types.rel: delete
other_availability_specs.rel: delete
platform_version_availability_specs.rel: delete

View File

@@ -6,12 +6,13 @@
| expressions.swift:6:9:6:9 | hello world | StringLiteralExpr |
| expressions.swift:7:10:7:10 | "..." | InterpolatedStringLiteralExpr |
| expressions.swift:7:10:7:10 | OpaqueValueExpr | OpaqueValueExpr |
| expressions.swift:7:10:7:10 | appendLiteral(_:) | DeclRefExpr |
| expressions.swift:7:10:7:10 | hello | StringLiteralExpr |
| expressions.swift:7:10:7:21 | TapExpr | TapExpr |
| expressions.swift:7:11:7:10 | call to appendLiteral(_:) | CallExpr |
| expressions.swift:7:11:7:11 | $interpolation | DeclRefExpr |
| expressions.swift:7:11:7:11 | &... | InOutExpr |
| expressions.swift:7:11:7:11 | .appendLiteral(_:) | MethodLookupExpr |
| expressions.swift:7:11:7:11 | call to appendLiteral(_:) | CallExpr |
| expressions.swift:7:18:7:18 | $interpolation | DeclRefExpr |
| expressions.swift:7:18:7:18 | &... | InOutExpr |
| expressions.swift:7:18:7:18 | .appendInterpolation(_:) | MethodLookupExpr |
@@ -22,6 +23,7 @@
| expressions.swift:7:21:7:21 | $interpolation | DeclRefExpr |
| expressions.swift:7:21:7:21 | &... | InOutExpr |
| expressions.swift:7:21:7:21 | .appendLiteral(_:) | MethodLookupExpr |
| expressions.swift:7:21:7:21 | appendLiteral(_:) | DeclRefExpr |
| expressions.swift:7:21:7:21 | call to appendLiteral(_:) | CallExpr |
| expressions.swift:8:15:8:15 | nil | NilLiteralExpr |
| expressions.swift:15:9:15:9 | x | DeclRefExpr |

View File

@@ -1,8 +1,10 @@
| expressions.swift:7:10:7:10 | appendLiteral(_:) | OrdinarySemantics |
| expressions.swift:7:11:7:11 | $interpolation | OrdinarySemantics |
| expressions.swift:7:18:7:18 | $interpolation | OrdinarySemantics |
| expressions.swift:7:18:7:18 | appendInterpolation(_:) | OrdinarySemantics |
| expressions.swift:7:19:7:19 | a | OrdinarySemantics |
| expressions.swift:7:21:7:21 | $interpolation | OrdinarySemantics |
| expressions.swift:7:21:7:21 | appendLiteral(_:) | OrdinarySemantics |
| expressions.swift:15:9:15:9 | x | OrdinarySemantics |
| expressions.swift:15:11:15:11 | !=(_:_:) | OrdinarySemantics |
| expressions.swift:16:19:16:19 | failed | OrdinarySemantics |

View File

@@ -1,18 +1,18 @@
instances
| file://:0:0:0:0 | KeyPathComponent | getKind: | 7 | getComponentType: | Int? |
| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 3 | getComponentType: | Int |
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 4 | getComponentType: | Int |
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 4 | getComponentType: | Int? |
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 5 | getComponentType: | Int |
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 8 | getComponentType: | Int? |
| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 3 | getComponentType: | Bar? |
| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 6 | getComponentType: | Bar |
| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 3 | getComponentType: | Int? |
| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 3 | getComponentType: | Bar? |
| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 6 | getComponentType: | Bar |
| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 3 | getComponentType: | Int |
| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 8 | getComponentType: | Int |
| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 9 | getComponentType: | Int |
| file://:0:0:0:0 | KeyPathComponent | getKind: | 9 | getComponentType: | Int? |
| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 5 | getComponentType: | Int |
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 6 | getComponentType: | Int |
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 6 | getComponentType: | Int? |
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 7 | getComponentType: | Int |
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 10 | getComponentType: | Int? |
| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 5 | getComponentType: | Bar? |
| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 8 | getComponentType: | Bar |
| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 5 | getComponentType: | Int? |
| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 5 | getComponentType: | Bar? |
| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 8 | getComponentType: | Bar |
| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 5 | getComponentType: | Int |
| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 10 | getComponentType: | Int |
| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 11 | getComponentType: | Int |
getSubscriptArgument
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | 0 | key_path_expr.swift:12:25:12:25 | : 0 |
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | 0 | key_path_expr.swift:13:35:13:35 | : a |

View File

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

View File

@@ -222,14 +222,16 @@ closures.swift:
# 39| getExpr(): [IntegerLiteralExpr] 1
# 39| getResult().getFullyConverted(): [AwaitExpr] await ...
# 39| getCapture(0): [CapturedDecl] callback
# 41| getElement(1): [CallExpr] call to Task<Success, Never>.init(priority:operation:)
# 41| getFunction(): [MethodLookupExpr] Task<Success, Never>.init(priority:operation:)
# 41| getElement(1): [CallExpr] call to Task<Success, Never>.init(name:priority:operation:)
# 41| getFunction(): [MethodLookupExpr] Task<Success, Never>.init(name:priority:operation:)
# 41| getBase(): [TypeExpr] Task<(), Never>.Type
# 41| getTypeRepr(): [TypeRepr] Task<(), Never>
# 41| getMethodRef(): [DeclRefExpr] Task<Success, Never>.init(priority:operation:)
# 41| getArgument(0): [Argument] priority: default priority
# 41| getMethodRef(): [DeclRefExpr] Task<Success, Never>.init(name:priority:operation:)
# 41| getArgument(0): [Argument] name: default name
# 41| getExpr(): [DefaultArgumentExpr] default name
# 41| getArgument(1): [Argument] priority: default priority
# 41| getExpr(): [DefaultArgumentExpr] default priority
# 41| getArgument(1): [Argument] operation: { ... }
# 41| getArgument(2): [Argument] operation: { ... }
# 41| getExpr(): [ExplicitClosureExpr] { ... }
# 41| getBody(): [BraceStmt] { ... }
# 42| getElement(0): [ReturnStmt] return ...
@@ -270,6 +272,7 @@ closures.swift:
# 46| getArgument(1): [Argument] : 1
# 46| getExpr(): [IntegerLiteralExpr] 1
# 41| [NilLiteralExpr] nil
# 41| [NilLiteralExpr] nil
# 50| [NamedFunction] foo()
# 50| InterfaceType = () -> Int
# 50| getBody(): [BraceStmt] { ... }

View File

@@ -103,7 +103,7 @@ getParentPattern
| var_decls.swift:65:19:65:19 | case_variable | var_decls.swift:65:8:65:35 | .value(...) |
| var_decls.swift:67:22:67:22 | unused_case_variable | var_decls.swift:67:8:67:42 | .value(...) |
getParentInitializer
| var_decls.swift:2:12:2:12 | $i$generator | var_decls.swift:2:12:2:16 | call to makeIterator() |
| var_decls.swift:2:12:2:12 | $i$generator | var_decls.swift:2:12:2:12 | call to makeIterator() |
| var_decls.swift:4:7:4:7 | i | var_decls.swift:4:11:4:11 | 0 |
| var_decls.swift:7:5:7:5 | numbers | var_decls.swift:7:15:7:18 | [...] |
| var_decls.swift:10:12:10:12 | numbers | var_decls.swift:10:22:10:35 | [...] |

View File

@@ -15,6 +15,7 @@ instances
| file://:0:0:0:0 | @attached(memberAttribute) | getKind: | 8 | getMacroSyntax: | 1 |
| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 |
| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 |
| file://:0:0:0:0 | @attached(peer) | getKind: | 32 | getMacroSyntax: | 1 |
| test.swift:1:2:1:26 | #freestanding(declaration) | getKind: | 2 | getMacroSyntax: | 0 |
| test.swift:3:2:3:25 | #freestanding(expression) | getKind: | 1 | getMacroSyntax: | 0 |
| test.swift:5:2:5:17 | @attached(member) | getKind: | 16 | getMacroSyntax: | 1 |
@@ -22,4 +23,5 @@ instances
getConformance
getName
| file://:0:0:0:0 | @attached(peer) | 0 | $() |
| file://:0:0:0:0 | @attached(peer) | 0 | _() |
| file://:0:0:0:0 | @attached(peer) | 0 | _lldb_summary() |

View File

@@ -47,6 +47,6 @@ func closures() {
func f2(
@Wrapper p1: Int,
@WrapperWithInit p2: Int,
// @WrapperWithProjected p3: Int, // Disabled causes crashes with Swift 6.1
// @WrapperWithProjectedAndInit p4: Int // Disabled causes crashes with Swift 6.1
// @WrapperWithProjected p3: Int, // Disabled causes crashes with Swift 6.1/6.2
// @WrapperWithProjectedAndInit p4: Int // Disabled causes crashes with Swift 6.1/6.2
) {}

View File

@@ -1,4 +1,2 @@
instances
| diagnostics.swift:2:1:2:25 | #warning(...) | getModule: | file://:0:0:0:0 | diagnostics | getKind: | 2 | getMessage: | diagnostics.swift:2:10:2:10 | I'm a warning |
| diagnostics.swift:3:1:3:26 | #error(...) | getModule: | file://:0:0:0:0 | diagnostics | getKind: | 1 | getMessage: | diagnostics.swift:3:8:3:8 | And I'm an error |
getMember

View File

@@ -10,7 +10,7 @@
}
func foo(
// @Wrapper x: Int // Disabled causes crashes with Swift 6.1
// @Wrapper x: Int // Disabled causes crashes with Swift 6.1/6.2
) {}
// foo(x: 42)
@@ -18,7 +18,7 @@ func foo(
let closure = {
(
// @Wrapper y: Int // Disabled causes crashes with Swift 6.1
// @Wrapper y: Int // Disabled causes crashes with Swift 6.1/6.2
) in return
}

View File

@@ -14,12 +14,12 @@ instances
| method_lookups.swift:37:11:37:11 | X.init() | getBase: | method_lookups.swift:37:11:37:11 | X.Type | getMethodRef: | method_lookups.swift:37:11:37:11 | X.init() |
| method_lookups.swift:37:11:37:15 | (no string representation) | getBase: | method_lookups.swift:37:11:37:13 | call to X.init() | getMethodRef: | method_lookups.swift:37:15:37:15 | { ... } |
| method_lookups.swift:37:15:37:15 | .baz(_:) | getBase: | file://:0:0:0:0 | self | getMethodRef: | method_lookups.swift:37:15:37:15 | baz(_:) |
| method_lookups.swift:40:1:40:1 | Task<Success, Never>.init(priority:operation:) | getBase: | method_lookups.swift:40:1:40:1 | Task<(), Never>.Type | getMethodRef: | method_lookups.swift:40:1:40:1 | Task<Success, Never>.init(priority:operation:) |
| method_lookups.swift:40:1:40:1 | Task<Success, Never>.init(name:priority:operation:) | getBase: | method_lookups.swift:40:1:40:1 | Task<(), Never>.Type | getMethodRef: | method_lookups.swift:40:1:40:1 | Task<Success, Never>.init(name:priority:operation:) |
| method_lookups.swift:41:3:41:5 | .foo(_:_:) | getBase: | method_lookups.swift:41:3:41:3 | Y.Type | getMethodRef: | method_lookups.swift:41:5:41:5 | foo(_:_:) |
| method_lookups.swift:42:9:42:9 | Y.init() | getBase: | method_lookups.swift:42:9:42:9 | Y.Type | getMethodRef: | method_lookups.swift:42:9:42:9 | Y.init() |
| method_lookups.swift:42:9:42:13 | .baz(_:) | getBase: | method_lookups.swift:42:9:42:11 | call to Y.init() | getMethodRef: | method_lookups.swift:42:13:42:13 | baz(_:) |
| method_lookups.swift:44:11:44:13 | .foo(_:_:) | getBase: | method_lookups.swift:44:11:44:11 | Y.Type | getMethodRef: | method_lookups.swift:44:13:44:13 | foo(_:_:) |
| method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(priority:operation:) | getBase: | method_lookups.swift:47:1:47:1 | Task<(), Never>.Type | getMethodRef: | method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(priority:operation:) |
| method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(name:priority:operation:) | getBase: | method_lookups.swift:47:1:47:1 | Task<(), Never>.Type | getMethodRef: | method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(name:priority:operation:) |
| method_lookups.swift:48:9:48:11 | .foo(_:_:) | getBase: | method_lookups.swift:48:9:48:9 | Z.Type | getMethodRef: | method_lookups.swift:48:11:48:11 | foo(_:_:) |
| method_lookups.swift:49:9:49:11 | .bar() | getBase: | method_lookups.swift:49:9:49:9 | Z.Type | getMethodRef: | method_lookups.swift:49:11:49:11 | bar() |
| method_lookups.swift:50:9:50:9 | Z.init() | getBase: | method_lookups.swift:50:9:50:9 | Z.Type | getMethodRef: | method_lookups.swift:50:9:50:9 | Z.init() |
@@ -44,12 +44,12 @@ getType
| method_lookups.swift:37:11:37:11 | X.init() | () -> X |
| method_lookups.swift:37:11:37:15 | (no string representation) | (Int) -> () |
| method_lookups.swift:37:15:37:15 | .baz(_:) | (Int) -> () |
| method_lookups.swift:40:1:40:1 | Task<Success, Never>.init(priority:operation:) | (TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> |
| method_lookups.swift:40:1:40:1 | Task<Success, Never>.init(name:priority:operation:) | (String?, TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> |
| method_lookups.swift:41:3:41:5 | .foo(_:_:) | (Int, Int) -> () |
| method_lookups.swift:42:9:42:9 | Y.init() | () -> Y |
| method_lookups.swift:42:9:42:13 | .baz(_:) | (Int) -> () |
| method_lookups.swift:44:11:44:13 | .foo(_:_:) | (Int, Int) -> () |
| method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(priority:operation:) | (TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> |
| method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(name:priority:operation:) | (String?, TaskPriority?, sending @escaping @isolated(any) () async -> ()) -> Task<(), Never> |
| method_lookups.swift:48:9:48:11 | .foo(_:_:) | @MainActor (Int, Int) -> () |
| method_lookups.swift:49:9:49:11 | .bar() | () -> () |
| method_lookups.swift:50:9:50:9 | Z.init() | @MainActor () -> Z |
@@ -70,12 +70,12 @@ getMember
| method_lookups.swift:36:11:36:13 | .bar() | method_lookups.swift:3:3:3:21 | bar() |
| method_lookups.swift:37:11:37:11 | X.init() | method_lookups.swift:6:3:8:3 | X.init() |
| method_lookups.swift:37:15:37:15 | .baz(_:) | method_lookups.swift:4:3:4:21 | baz(_:) |
| method_lookups.swift:40:1:40:1 | Task<Success, Never>.init(priority:operation:) | file://:0:0:0:0 | Task<Success, Never>.init(priority:operation:) |
| method_lookups.swift:40:1:40:1 | Task<Success, Never>.init(name:priority:operation:) | file://:0:0:0:0 | Task<Success, Never>.init(name:priority:operation:) |
| method_lookups.swift:41:3:41:5 | .foo(_:_:) | method_lookups.swift:12:3:12:35 | foo(_:_:) |
| method_lookups.swift:42:9:42:9 | Y.init() | method_lookups.swift:15:3:17:3 | Y.init() |
| method_lookups.swift:42:9:42:13 | .baz(_:) | method_lookups.swift:13:3:13:21 | baz(_:) |
| method_lookups.swift:44:11:44:13 | .foo(_:_:) | method_lookups.swift:12:3:12:35 | foo(_:_:) |
| method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(priority:operation:) | file://:0:0:0:0 | Task<Success, Never>.init(priority:operation:) |
| method_lookups.swift:47:1:47:1 | Task<Success, Never>.init(name:priority:operation:) | file://:0:0:0:0 | Task<Success, Never>.init(name:priority:operation:) |
| method_lookups.swift:48:9:48:11 | .foo(_:_:) | method_lookups.swift:22:3:22:35 | foo(_:_:) |
| method_lookups.swift:49:9:49:11 | .bar() | method_lookups.swift:23:15:23:33 | bar() |
| method_lookups.swift:50:9:50:9 | Z.init() | method_lookups.swift:26:3:28:3 | Z.init() |

View File

@@ -3,5 +3,5 @@ instances
getSuperclass
| any C & P1 & P2 | C |
getProtocol
| any C & P1 & P2 | 0 | opened_archetypes.swift:3:1:3:14 | P1 |
| any C & P1 & P2 | 1 | opened_archetypes.swift:9:1:9:14 | P2 |
| any C & P1 & P2 | 0 | existential_archetypes.swift:3:1:3:14 | P1 |
| any C & P1 & P2 | 1 | existential_archetypes.swift:9:1:9:14 | P2 |

View File

@@ -3,7 +3,7 @@ import codeql.swift.elements
import TestUtils
query predicate instances(
OpenedArchetypeType x, string getName__label, string getName, string getCanonicalType__label,
ExistentialArchetypeType x, string getName__label, string getName, string getCanonicalType__label,
Type getCanonicalType, string getInterfaceType__label, Type getInterfaceType
) {
toBeTested(x) and
@@ -16,10 +16,10 @@ query predicate instances(
getInterfaceType = x.getInterfaceType()
}
query predicate getSuperclass(OpenedArchetypeType x, Type getSuperclass) {
query predicate getSuperclass(ExistentialArchetypeType x, Type getSuperclass) {
toBeTested(x) and not x.isUnknown() and getSuperclass = x.getSuperclass()
}
query predicate getProtocol(OpenedArchetypeType x, int index, ProtocolDecl getProtocol) {
query predicate getProtocol(ExistentialArchetypeType x, int index, ProtocolDecl getProtocol) {
toBeTested(x) and not x.isUnknown() and getProtocol = x.getProtocol(index)
}

View File

@@ -222,7 +222,7 @@ cfg.swift:
# 40| getFunction(): [MethodLookupExpr] .appendLiteral(_:)
# 40| getBase(): [DeclRefExpr] $interpolation
# 40| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 40| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 40| getArgument(0): [Argument] : Unknown error
# 40| getExpr(): [StringLiteralExpr] Unknown error
# 40| getElement(1): [CallExpr] call to appendInterpolation(_:)
@@ -236,7 +236,7 @@ cfg.swift:
# 40| getFunction(): [MethodLookupExpr] .appendLiteral(_:)
# 40| getBase(): [DeclRefExpr] $interpolation
# 40| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 40| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 40| getArgument(0): [Argument] :
# 40| getExpr(): [StringLiteralExpr]
# 40| getElement(0).getFullyConverted(): [ErasureExpr] (Any) ...
@@ -717,13 +717,13 @@ cfg.swift:
# 138| getExpr(): [IntegerLiteralExpr] 0
# 138| getArgument(1): [Argument] : 10
# 138| getExpr(): [IntegerLiteralExpr] 10
#-----| getMethodRef(): [DeclRefExpr] makeIterator()
# 138| getMethodRef(): [DeclRefExpr] makeIterator()
# 138| getPattern(0): [NamedPattern] $generator
# 138| getNextCall(): [CallExpr] call to next()
# 138| getFunction(): [MethodLookupExpr] .next()
# 138| getBase(): [DeclRefExpr] $generator
# 138| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] next()
# 138| getMethodRef(): [DeclRefExpr] next()
# 138| getBody(): [BraceStmt] { ... }
# 140| getElement(1): [SwitchStmt] switch x { ... }
# 140| getExpr(): [DeclRefExpr] x
@@ -1462,7 +1462,7 @@ cfg.swift:
# 263| getFunction(): [MethodLookupExpr] .appendLiteral(_:)
# 263| getBase(): [DeclRefExpr] $interpolation
# 263| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 263| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 263| getArgument(0): [Argument] :
# 263| getExpr(): [StringLiteralExpr]
# 263| getElement(1): [CallExpr] call to appendInterpolation(_:)
@@ -1476,7 +1476,7 @@ cfg.swift:
# 263| getFunction(): [MethodLookupExpr] .appendLiteral(_:)
# 263| getBase(): [DeclRefExpr] $interpolation
# 263| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 263| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 263| getArgument(0): [Argument] : +
# 263| getExpr(): [StringLiteralExpr] +
# 263| getElement(3): [CallExpr] call to appendInterpolation(_:)
@@ -1490,7 +1490,7 @@ cfg.swift:
# 263| getFunction(): [MethodLookupExpr] .appendLiteral(_:)
# 263| getBase(): [DeclRefExpr] $interpolation
# 263| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 263| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 263| getArgument(0): [Argument] : is equal to
# 263| getExpr(): [StringLiteralExpr] is equal to
# 263| getElement(5): [CallExpr] call to appendInterpolation(_:)
@@ -1512,7 +1512,7 @@ cfg.swift:
# 263| getFunction(): [MethodLookupExpr] .appendLiteral(_:)
# 263| getBase(): [DeclRefExpr] $interpolation
# 263| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 263| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 263| getArgument(0): [Argument] : and here is a zero:
# 263| getExpr(): [StringLiteralExpr] and here is a zero:
# 263| getElement(7): [CallExpr] call to appendInterpolation(_:)
@@ -1527,7 +1527,7 @@ cfg.swift:
# 263| getFunction(): [MethodLookupExpr] .appendLiteral(_:)
# 263| getBase(): [DeclRefExpr] $interpolation
# 263| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 263| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 263| getArgument(0): [Argument] :
# 263| getExpr(): [StringLiteralExpr]
# 266| [NamedFunction] testSubscriptExpr()
@@ -3128,8 +3128,8 @@ cfg.swift:
# 499| getCondition(): [StmtCondition] StmtCondition
# 499| getElement(0): [ConditionElement] #available
# 499| getAvailability(): [AvailabilityInfo] #available
# 499| getSpec(0): [PlatformVersionAvailabilitySpec] macOS 10
# 499| getSpec(1): [OtherAvailabilitySpec] *
# 499| getSpec(0): [AvailabilitySpec] macOS 10
# 499| getSpec(1): [AvailabilitySpec] *
# 499| getThen(): [BraceStmt] { ... }
# 500| getElement(0): [BinaryExpr] ... .+=(_:_:) ...
# 500| getFunction(): [MethodLookupExpr] .+=(_:_:)
@@ -3145,8 +3145,8 @@ cfg.swift:
# 503| getCondition(): [StmtCondition] StmtCondition
# 503| getElement(0): [ConditionElement] #available
# 503| getAvailability(): [AvailabilityInfo] #available
# 503| getSpec(0): [PlatformVersionAvailabilitySpec] macOS 10.13
# 503| getSpec(1): [OtherAvailabilitySpec] *
# 503| getSpec(0): [AvailabilitySpec] macOS 10.13
# 503| getSpec(1): [AvailabilitySpec] *
# 503| getThen(): [BraceStmt] { ... }
# 504| getElement(0): [BinaryExpr] ... .+=(_:_:) ...
# 504| getFunction(): [MethodLookupExpr] .+=(_:_:)
@@ -3162,9 +3162,9 @@ cfg.swift:
# 507| getCondition(): [StmtCondition] StmtCondition
# 507| getElement(0): [ConditionElement] #unavailable
# 507| getAvailability(): [AvailabilityInfo] #unavailable
# 507| getSpec(0): [PlatformVersionAvailabilitySpec] iOS 10
# 507| getSpec(1): [PlatformVersionAvailabilitySpec] watchOS 10
# 507| getSpec(2): [PlatformVersionAvailabilitySpec] macOS 10
# 507| getSpec(0): [AvailabilitySpec] iOS 10
# 507| getSpec(1): [AvailabilitySpec] watchOS 10
# 507| getSpec(2): [AvailabilitySpec] macOS 10
# 507| getThen(): [BraceStmt] { ... }
# 508| getElement(0): [BinaryExpr] ... .+=(_:_:) ...
# 508| getFunction(): [MethodLookupExpr] .+=(_:_:)
@@ -3180,8 +3180,8 @@ cfg.swift:
# 511| getCondition(): [StmtCondition] StmtCondition
# 511| getElement(0): [ConditionElement] #available
# 511| getAvailability(): [AvailabilityInfo] #available
# 511| getSpec(0): [PlatformVersionAvailabilitySpec] macOS 12
# 511| getSpec(1): [OtherAvailabilitySpec] *
# 511| getSpec(0): [AvailabilitySpec] macOS 12
# 511| getSpec(1): [AvailabilitySpec] *
# 511| getBody(): [BraceStmt] { ... }
# 512| getElement(0): [BinaryExpr] ... .+=(_:_:) ...
# 512| getFunction(): [MethodLookupExpr] .+=(_:_:)
@@ -3197,12 +3197,12 @@ cfg.swift:
# 515| getCondition(): [StmtCondition] StmtCondition
# 515| getElement(0): [ConditionElement] #available
# 515| getAvailability(): [AvailabilityInfo] #available
# 515| getSpec(0): [PlatformVersionAvailabilitySpec] macOS 12
# 515| getSpec(1): [OtherAvailabilitySpec] *
# 515| getSpec(0): [AvailabilitySpec] macOS 12
# 515| getSpec(1): [AvailabilitySpec] *
# 515| getElement(1): [ConditionElement] #available
# 515| getAvailability(): [AvailabilityInfo] #available
# 515| getSpec(0): [PlatformVersionAvailabilitySpec] iOS 12
# 515| getSpec(1): [OtherAvailabilitySpec] *
# 515| getSpec(0): [AvailabilitySpec] iOS 12
# 515| getSpec(1): [AvailabilitySpec] *
# 515| getThen(): [BraceStmt] { ... }
# 516| getElement(0): [BinaryExpr] ... .+=(_:_:) ...
# 516| getFunction(): [MethodLookupExpr] .+=(_:_:)
@@ -3245,14 +3245,16 @@ cfg.swift:
# 524| getParam(0): [ParamDecl] continuation
# 524| Type = AsyncStream<Int>.Continuation
# 523| getBody(): [BraceStmt] { ... }
# 525| getElement(0): [CallExpr] call to detached(priority:operation:)
# 525| getFunction(): [MethodLookupExpr] .detached(priority:operation:)
# 525| getElement(0): [CallExpr] call to detached(name:priority:operation:)
# 525| getFunction(): [MethodLookupExpr] .detached(name:priority:operation:)
# 525| getBase(): [TypeExpr] Task<(), Never>.Type
# 525| getTypeRepr(): [TypeRepr] Task<(), Never>
# 525| getMethodRef(): [DeclRefExpr] detached(priority:operation:)
# 525| getArgument(0): [Argument] priority: default priority
# 525| getMethodRef(): [DeclRefExpr] detached(name:priority:operation:)
# 525| getArgument(0): [Argument] name: default name
# 525| getExpr(): [DefaultArgumentExpr] default name
# 525| getArgument(1): [Argument] priority: default priority
# 525| getExpr(): [DefaultArgumentExpr] default priority
# 525| getArgument(1): [Argument] operation: { ... }
# 525| getArgument(2): [Argument] operation: { ... }
# 525| getExpr(): [ExplicitClosureExpr] { ... }
# 525| getBody(): [BraceStmt] { ... }
# 526| getElement(0): [ForEachStmt] for ... in ... { ... }
@@ -3273,13 +3275,13 @@ cfg.swift:
# 526| getExpr(): [IntegerLiteralExpr] 1
# 526| getArgument(1): [Argument] : 100
# 526| getExpr(): [IntegerLiteralExpr] 100
#-----| getMethodRef(): [DeclRefExpr] makeIterator()
# 526| getMethodRef(): [DeclRefExpr] makeIterator()
# 526| getPattern(0): [NamedPattern] $i$generator
# 526| getNextCall(): [CallExpr] call to next()
# 526| getFunction(): [MethodLookupExpr] .next()
# 526| getBase(): [DeclRefExpr] $i$generator
# 526| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] next()
# 526| getMethodRef(): [DeclRefExpr] next()
# 526| getBody(): [BraceStmt] { ... }
# 527| getElement(0): [CallExpr] call to yield(_:)
# 527| getFunction(): [MethodLookupExpr] .yield(_:)
@@ -3305,13 +3307,13 @@ cfg.swift:
# 533| getFunction(): [MethodLookupExpr] .makeAsyncIterator()
# 533| getBase(): [DeclRefExpr] stream
# 533| getBase().getFullyConverted(): [LoadExpr] (AsyncStream<Int>) ...
#-----| getMethodRef(): [DeclRefExpr] makeAsyncIterator()
# 533| getMethodRef(): [DeclRefExpr] makeAsyncIterator()
# 533| getPattern(0): [NamedPattern] $i$generator
# 533| getNextCall(): [CallExpr] call to next(isolation:)
# 533| getFunction(): [MethodLookupExpr] .next(isolation:)
# 533| getBase(): [DeclRefExpr] $i$generator
# 533| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] next(isolation:)
# 533| getMethodRef(): [DeclRefExpr] next(isolation:)
# 533| getArgument(0): [Argument] isolation: CurrentContextIsolationExpr
# 533| getExpr(): [CurrentContextIsolationExpr] CurrentContextIsolationExpr
# 533| getNextCall().getFullyConverted(): [AwaitExpr] await ...
@@ -3328,6 +3330,7 @@ cfg.swift:
# 534| getArgument(2): [Argument] terminator: default terminator
# 534| getExpr(): [DefaultArgumentExpr] default terminator
# 525| [NilLiteralExpr] nil
# 525| [NilLiteralExpr] nil
# 533| [NilLiteralExpr] nil
# 538| [NamedFunction] testNilCoalescing(x:)
# 538| InterfaceType = (Int?) -> Int
@@ -4819,7 +4822,7 @@ expressions.swift:
# 7| getFunction(): [MethodLookupExpr] .appendLiteral(_:)
# 7| getBase(): [DeclRefExpr] $interpolation
# 7| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 7| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 7| getArgument(0): [Argument] : hello
# 7| getExpr(): [StringLiteralExpr] hello
# 7| getElement(1): [CallExpr] call to appendInterpolation(_:)
@@ -4833,7 +4836,7 @@ expressions.swift:
# 7| getFunction(): [MethodLookupExpr] .appendLiteral(_:)
# 7| getBase(): [DeclRefExpr] $interpolation
# 7| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 7| getMethodRef(): [DeclRefExpr] appendLiteral(_:)
# 7| getArgument(0): [Argument] :
# 7| getExpr(): [StringLiteralExpr]
# 7| getPattern(0): [NamedPattern] s1
@@ -7027,13 +7030,13 @@ statements.swift:
# 2| getExpr(): [IntegerLiteralExpr] 1
# 2| getArgument(1): [Argument] : 5
# 2| getExpr(): [IntegerLiteralExpr] 5
#-----| getMethodRef(): [DeclRefExpr] makeIterator()
# 2| getMethodRef(): [DeclRefExpr] makeIterator()
# 2| getPattern(0): [NamedPattern] $i$generator
# 2| getNextCall(): [CallExpr] call to next()
# 2| getFunction(): [MethodLookupExpr] .next()
# 2| getBase(): [DeclRefExpr] $i$generator
# 2| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] next()
# 2| getMethodRef(): [DeclRefExpr] next()
# 2| getBody(): [BraceStmt] { ... }
# 3| getElement(0): [IfStmt] if ... then { ... } else { ... }
# 3| getCondition(): [StmtCondition] StmtCondition
@@ -7471,13 +7474,13 @@ statements.swift:
# 71| getInit(0): [CallExpr] call to makeIterator()
# 71| getFunction(): [MethodLookupExpr] .makeIterator()
# 71| getBase(): [DeclRefExpr] numbers
#-----| getMethodRef(): [DeclRefExpr] makeIterator()
# 71| getMethodRef(): [DeclRefExpr] makeIterator()
# 71| getPattern(0): [NamedPattern] $number$generator
# 71| getNextCall(): [CallExpr] call to next()
# 71| getFunction(): [MethodLookupExpr] .next()
# 71| getBase(): [DeclRefExpr] $number$generator
# 71| getBase().getFullyConverted(): [InOutExpr] &...
#-----| getMethodRef(): [DeclRefExpr] next()
# 71| getMethodRef(): [DeclRefExpr] next()
# 71| getBody(): [BraceStmt] { ... }
# 74| [StructDecl] HasModifyAccessorDecl
# 75| getMember(0): [PatternBindingDecl] var ... = ...
@@ -7559,8 +7562,8 @@ statements.swift:
# 87| getCondition(): [StmtCondition] StmtCondition
# 87| getElement(0): [ConditionElement] #available
# 87| getAvailability(): [AvailabilityInfo] #available
# 87| getSpec(0): [PlatformVersionAvailabilitySpec] macOS 155
# 87| getSpec(1): [OtherAvailabilitySpec] *
# 87| getSpec(0): [AvailabilitySpec] macOS 155
# 87| getSpec(1): [AvailabilitySpec] *
# 87| getThen(): [BraceStmt] { ... }
# 88| getElement(0): [CallExpr] call to print(_:separator:terminator:)
# 88| getFunction(): [DeclRefExpr] print(_:separator:terminator:)
@@ -7579,7 +7582,7 @@ statements.swift:
# 91| getCondition(): [StmtCondition] StmtCondition
# 91| getElement(0): [ConditionElement] #unavailable
# 91| getAvailability(): [AvailabilityInfo] #unavailable
# 91| getSpec(0): [PlatformVersionAvailabilitySpec] macOS 42
# 91| getSpec(0): [AvailabilitySpec] macOS 42
# 91| getThen(): [BraceStmt] { ... }
# 92| getElement(0): [CallExpr] call to print(_:separator:terminator:)
# 92| getFunction(): [DeclRefExpr] print(_:separator:terminator:)

View File

@@ -124,14 +124,14 @@
| cfg.swift:40:11:40:11 | "..." | cfg.swift:40:11:40:11 | (Any) ... | |
| cfg.swift:40:11:40:11 | (Any) ... | cfg.swift:40:11:40:11 | [...] | |
| cfg.swift:40:11:40:11 | OpaqueValueExpr | cfg.swift:40:12:40:12 | .appendLiteral(_:) | |
| cfg.swift:40:11:40:11 | Unknown error | cfg.swift:40:12:40:11 | call to appendLiteral(_:) | |
| cfg.swift:40:11:40:11 | Unknown error | cfg.swift:40:12:40:12 | call to appendLiteral(_:) | |
| cfg.swift:40:11:40:11 | [...] | cfg.swift:40:10:40:10 | default separator | |
| cfg.swift:40:11:40:11 | [...] | cfg.swift:40:11:40:11 | [...] | |
| cfg.swift:40:11:40:34 | TapExpr | cfg.swift:40:11:40:11 | "..." | |
| cfg.swift:40:12:40:11 | call to appendLiteral(_:) | cfg.swift:40:27:40:27 | .appendInterpolation(_:) | |
| cfg.swift:40:12:40:12 | $interpolation | cfg.swift:40:12:40:12 | &... | |
| cfg.swift:40:12:40:12 | &... | cfg.swift:40:11:40:11 | Unknown error | |
| cfg.swift:40:12:40:12 | .appendLiteral(_:) | cfg.swift:40:12:40:12 | $interpolation | |
| cfg.swift:40:12:40:12 | call to appendLiteral(_:) | cfg.swift:40:27:40:27 | .appendInterpolation(_:) | |
| cfg.swift:40:27:40:27 | $interpolation | cfg.swift:40:27:40:27 | &... | |
| cfg.swift:40:27:40:27 | &... | cfg.swift:40:28:40:28 | error | |
| cfg.swift:40:27:40:27 | .appendInterpolation(_:) | cfg.swift:40:27:40:27 | $interpolation | |
@@ -472,10 +472,10 @@
| cfg.swift:138:3:138:22 | for ... in ... { ... } | cfg.swift:140:3:148:3 | switch x { ... } | empty |
| cfg.swift:138:7:138:7 | _ | cfg.swift:138:19:138:22 | { ... } | match |
| cfg.swift:138:12:138:12 | 0 | cfg.swift:138:16:138:16 | 10 | |
| cfg.swift:138:12:138:12 | $generator | cfg.swift:138:12:138:16 | .makeIterator() | match |
| cfg.swift:138:12:138:16 | ... ....(_:_:) ... | cfg.swift:138:12:138:16 | call to makeIterator() | |
| cfg.swift:138:12:138:16 | .makeIterator() | cfg.swift:138:13:138:13 | ....(_:_:) | |
| cfg.swift:138:12:138:16 | call to makeIterator() | file://:0:0:0:0 | var ... = ... | |
| cfg.swift:138:12:138:12 | $generator | cfg.swift:138:12:138:12 | .makeIterator() | match |
| cfg.swift:138:12:138:12 | .makeIterator() | cfg.swift:138:13:138:13 | ....(_:_:) | |
| cfg.swift:138:12:138:12 | call to makeIterator() | file://:0:0:0:0 | var ... = ... | |
| cfg.swift:138:12:138:16 | ... ....(_:_:) ... | cfg.swift:138:12:138:12 | call to makeIterator() | |
| cfg.swift:138:13:138:13 | ....(_:_:) | cfg.swift:138:13:138:13 | Int.Type | |
| cfg.swift:138:13:138:13 | Int.Type | cfg.swift:138:12:138:12 | 0 | |
| cfg.swift:138:16:138:16 | 10 | cfg.swift:138:12:138:16 | ... ....(_:_:) ... | |
@@ -896,14 +896,14 @@
| cfg.swift:262:25:262:29 | x | cfg.swift:262:34:262:38 | y | |
| cfg.swift:262:34:262:38 | y | cfg.swift:263:10:263:10 | OpaqueValueExpr | |
| cfg.swift:263:3:263:10 | return ... | cfg.swift:262:1:264:1 | exit interpolatedString(x:y:) (normal) | return |
| cfg.swift:263:10:263:10 | | cfg.swift:263:11:263:10 | call to appendLiteral(_:) | |
| cfg.swift:263:10:263:10 | | cfg.swift:263:11:263:11 | call to appendLiteral(_:) | |
| cfg.swift:263:10:263:10 | "..." | cfg.swift:263:3:263:10 | return ... | |
| cfg.swift:263:10:263:10 | OpaqueValueExpr | cfg.swift:263:11:263:11 | .appendLiteral(_:) | |
| cfg.swift:263:10:263:79 | TapExpr | cfg.swift:263:10:263:10 | "..." | |
| cfg.swift:263:11:263:10 | call to appendLiteral(_:) | cfg.swift:263:12:263:12 | .appendInterpolation(_:) | |
| cfg.swift:263:11:263:11 | $interpolation | cfg.swift:263:11:263:11 | &... | |
| cfg.swift:263:11:263:11 | &... | cfg.swift:263:10:263:10 | | |
| cfg.swift:263:11:263:11 | .appendLiteral(_:) | cfg.swift:263:11:263:11 | $interpolation | |
| cfg.swift:263:11:263:11 | call to appendLiteral(_:) | cfg.swift:263:12:263:12 | .appendInterpolation(_:) | |
| cfg.swift:263:12:263:12 | $interpolation | cfg.swift:263:12:263:12 | &... | |
| cfg.swift:263:12:263:12 | &... | cfg.swift:263:13:263:13 | x | |
| cfg.swift:263:12:263:12 | .appendInterpolation(_:) | cfg.swift:263:12:263:12 | $interpolation | |
@@ -2002,12 +2002,13 @@
| cfg.swift:523:78:531:5 | exit { ... } (normal) | cfg.swift:523:78:531:5 | exit { ... } | |
| cfg.swift:523:78:531:5 | { ... } | cfg.swift:523:18:531:6 | call to AsyncStream<Element>.init(_:bufferingPolicy:_:) | |
| cfg.swift:523:78:531:5 | { ... } | cfg.swift:524:9:524:9 | continuation | |
| cfg.swift:524:9:524:9 | continuation | cfg.swift:525:13:525:18 | .detached(priority:operation:) | |
| cfg.swift:525:13:525:13 | Task<(), Never>.Type | cfg.swift:525:27:525:27 | default priority | |
| cfg.swift:525:13:525:18 | .detached(priority:operation:) | cfg.swift:525:13:525:13 | Task<(), Never>.Type | |
| cfg.swift:525:13:530:13 | call to detached(priority:operation:) | cfg.swift:523:78:531:5 | exit { ... } (normal) | |
| cfg.swift:524:9:524:9 | continuation | cfg.swift:525:13:525:18 | .detached(name:priority:operation:) | |
| cfg.swift:525:13:525:13 | Task<(), Never>.Type | cfg.swift:525:27:525:27 | default name | |
| cfg.swift:525:13:525:18 | .detached(name:priority:operation:) | cfg.swift:525:13:525:13 | Task<(), Never>.Type | |
| cfg.swift:525:13:530:13 | call to detached(name:priority:operation:) | cfg.swift:523:78:531:5 | exit { ... } (normal) | |
| cfg.swift:525:27:525:27 | default name | cfg.swift:525:27:525:27 | default priority | |
| cfg.swift:525:27:525:27 | default priority | cfg.swift:525:27:530:13 | { ... } | |
| cfg.swift:525:27:530:13 | (@isolated(any) () async -> ()) ... | cfg.swift:525:13:530:13 | call to detached(priority:operation:) | |
| cfg.swift:525:27:530:13 | (@isolated(any) () async -> ()) ... | cfg.swift:525:13:530:13 | call to detached(name:priority:operation:) | |
| cfg.swift:525:27:530:13 | enter { ... } | cfg.swift:525:27:530:13 | { ... } | |
| cfg.swift:525:27:530:13 | exit { ... } (normal) | cfg.swift:525:27:530:13 | exit { ... } | |
| cfg.swift:525:27:530:13 | { ... } | cfg.swift:525:27:530:13 | (@isolated(any) () async -> ()) ... | |
@@ -2020,10 +2021,10 @@
| cfg.swift:526:17:528:17 | for ... in ... { ... } | cfg.swift:529:17:529:30 | .finish() | empty |
| cfg.swift:526:21:526:21 | i | cfg.swift:527:21:527:34 | .yield(_:) | match |
| cfg.swift:526:26:526:26 | 1 | cfg.swift:526:30:526:30 | 100 | |
| cfg.swift:526:26:526:26 | $i$generator | cfg.swift:526:26:526:30 | .makeIterator() | match |
| cfg.swift:526:26:526:30 | ... ....(_:_:) ... | cfg.swift:526:26:526:30 | call to makeIterator() | |
| cfg.swift:526:26:526:30 | .makeIterator() | cfg.swift:526:27:526:27 | ....(_:_:) | |
| cfg.swift:526:26:526:30 | call to makeIterator() | file://:0:0:0:0 | var ... = ... | |
| cfg.swift:526:26:526:26 | $i$generator | cfg.swift:526:26:526:26 | .makeIterator() | match |
| cfg.swift:526:26:526:26 | .makeIterator() | cfg.swift:526:27:526:27 | ....(_:_:) | |
| cfg.swift:526:26:526:26 | call to makeIterator() | file://:0:0:0:0 | var ... = ... | |
| cfg.swift:526:26:526:30 | ... ....(_:_:) ... | cfg.swift:526:26:526:26 | call to makeIterator() | |
| cfg.swift:526:27:526:27 | ....(_:_:) | cfg.swift:526:27:526:27 | Int.Type | |
| cfg.swift:526:27:526:27 | Int.Type | cfg.swift:526:26:526:26 | 1 | |
| cfg.swift:526:30:526:30 | 100 | cfg.swift:526:26:526:30 | ... ....(_:_:) ... | |

View File

@@ -150,8 +150,8 @@ edges
| test2.swift:84:9:84:15 | (...) [Tuple element at index 1] | test2.swift:84:14:84:14 | v | provenance | |
| test2.swift:84:14:84:14 | v | test2.swift:86:19:86:19 | v | provenance | |
| test2.swift:84:20:84:20 | a1 [Collection element] | test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | provenance | |
| test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | test2.swift:84:20:84:34 | call to makeIterator() [Collection element, Tuple element at index 1] | provenance | |
| test2.swift:84:20:84:34 | call to makeIterator() [Collection element, Tuple element at index 1] | test2.swift:84:5:84:5 | $generator [Collection element, Tuple element at index 1] | provenance | |
| test2.swift:84:20:84:20 | call to makeIterator() [Collection element, Tuple element at index 1] | test2.swift:84:5:84:5 | $generator [Collection element, Tuple element at index 1] | provenance | |
| test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | test2.swift:84:20:84:20 | call to makeIterator() [Collection element, Tuple element at index 1] | provenance | |
| test2.swift:93:5:93:5 | [post] a2 [Collection element] | test2.swift:95:14:95:14 | a2 [Collection element] | provenance | |
| test2.swift:93:5:93:5 | [post] a2 [Collection element] | test2.swift:99:19:99:19 | a2 [Collection element] | provenance | |
| test2.swift:93:5:93:5 | [post] a2 [Collection element] | test2.swift:101:20:101:20 | a2 [Collection element] | provenance | |
@@ -167,8 +167,8 @@ edges
| test2.swift:101:9:101:15 | (...) [Tuple element at index 1] | test2.swift:101:14:101:14 | v | provenance | |
| test2.swift:101:14:101:14 | v | test2.swift:103:19:103:19 | v | provenance | |
| test2.swift:101:20:101:20 | a2 [Collection element] | test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | provenance | |
| test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | test2.swift:101:20:101:34 | call to makeIterator() [Collection element, Tuple element at index 1] | provenance | |
| test2.swift:101:20:101:34 | call to makeIterator() [Collection element, Tuple element at index 1] | test2.swift:101:5:101:5 | $generator [Collection element, Tuple element at index 1] | provenance | |
| test2.swift:101:20:101:20 | call to makeIterator() [Collection element, Tuple element at index 1] | test2.swift:101:5:101:5 | $generator [Collection element, Tuple element at index 1] | provenance | |
| test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | test2.swift:101:20:101:20 | call to makeIterator() [Collection element, Tuple element at index 1] | provenance | |
| test.swift:6:19:6:26 | call to source() | test.swift:7:15:7:15 | t1 | provenance | |
| test.swift:6:19:6:26 | call to source() | test.swift:9:15:9:15 | t1 | provenance | |
| test.swift:6:19:6:26 | call to source() | test.swift:10:15:10:15 | t2 | provenance | |
@@ -940,8 +940,8 @@ nodes
| test2.swift:84:9:84:15 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] |
| test2.swift:84:14:84:14 | v | semmle.label | v |
| test2.swift:84:20:84:20 | a1 [Collection element] | semmle.label | a1 [Collection element] |
| test2.swift:84:20:84:20 | call to makeIterator() [Collection element, Tuple element at index 1] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 1] |
| test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | semmle.label | call to enumerated() [Collection element, Tuple element at index 1] |
| test2.swift:84:20:84:34 | call to makeIterator() [Collection element, Tuple element at index 1] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 1] |
| test2.swift:86:19:86:19 | v | semmle.label | v |
| test2.swift:93:5:93:5 | [post] a2 [Collection element] | semmle.label | [post] a2 [Collection element] |
| test2.swift:93:13:93:29 | call to source(_:) | semmle.label | call to source(_:) |
@@ -958,8 +958,8 @@ nodes
| test2.swift:101:9:101:15 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] |
| test2.swift:101:14:101:14 | v | semmle.label | v |
| test2.swift:101:20:101:20 | a2 [Collection element] | semmle.label | a2 [Collection element] |
| test2.swift:101:20:101:20 | call to makeIterator() [Collection element, Tuple element at index 1] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 1] |
| test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | semmle.label | call to enumerated() [Collection element, Tuple element at index 1] |
| test2.swift:101:20:101:34 | call to makeIterator() [Collection element, Tuple element at index 1] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 1] |
| test2.swift:103:19:103:19 | v | semmle.label | v |
| test.swift:6:19:6:26 | call to source() | semmle.label | call to source() |
| test.swift:7:15:7:15 | t1 | semmle.label | t1 |

View File

@@ -37,9 +37,9 @@
| test2.swift:18:16:18:16 | SSA def($key$generator) | test2.swift:18:5:18:5 | $key$generator |
| test2.swift:18:16:18:16 | [post] d1 | test2.swift:20:19:20:19 | d1 |
| test2.swift:18:16:18:16 | [post] d1 | test2.swift:22:18:22:18 | d1 |
| test2.swift:18:16:18:16 | call to makeIterator() | test2.swift:18:16:18:16 | $key$generator |
| test2.swift:18:16:18:16 | d1 | test2.swift:20:19:20:19 | d1 |
| test2.swift:18:16:18:16 | d1 | test2.swift:22:18:22:18 | d1 |
| test2.swift:18:16:18:19 | call to makeIterator() | test2.swift:18:16:18:16 | $key$generator |
| test2.swift:19:19:19:19 | [post] key | test2.swift:20:22:20:22 | key |
| test2.swift:19:19:19:19 | key | test2.swift:20:22:20:22 | key |
| test2.swift:20:19:20:19 | [post] d1 | test2.swift:20:19:20:19 | d1 |
@@ -55,8 +55,8 @@
| test2.swift:22:18:22:18 | $value$generator | test2.swift:22:18:22:18 | SSA def($value$generator) |
| test2.swift:22:18:22:18 | SSA def($value$generator) | test2.swift:22:5:22:5 | $value$generator |
| test2.swift:22:18:22:18 | [post] d1 | test2.swift:25:25:25:25 | d1 |
| test2.swift:22:18:22:18 | call to makeIterator() | test2.swift:22:18:22:18 | $value$generator |
| test2.swift:22:18:22:18 | d1 | test2.swift:25:25:25:25 | d1 |
| test2.swift:22:18:22:21 | call to makeIterator() | test2.swift:22:18:22:18 | $value$generator |
| test2.swift:25:5:25:5 | $generator | test2.swift:25:5:25:5 | &... |
| test2.swift:25:5:25:5 | &... | test2.swift:25:5:25:5 | $generator |
| test2.swift:25:5:25:5 | [post] $generator | test2.swift:25:5:25:5 | &... |
@@ -131,9 +131,9 @@
| test2.swift:62:16:62:16 | SSA def($key$generator) | test2.swift:62:5:62:5 | $key$generator |
| test2.swift:62:16:62:16 | [post] d4 | test2.swift:64:19:64:19 | d4 |
| test2.swift:62:16:62:16 | [post] d4 | test2.swift:66:18:66:18 | d4 |
| test2.swift:62:16:62:16 | call to makeIterator() | test2.swift:62:16:62:16 | $key$generator |
| test2.swift:62:16:62:16 | d4 | test2.swift:64:19:64:19 | d4 |
| test2.swift:62:16:62:16 | d4 | test2.swift:66:18:66:18 | d4 |
| test2.swift:62:16:62:19 | call to makeIterator() | test2.swift:62:16:62:16 | $key$generator |
| test2.swift:63:19:63:19 | [post] key | test2.swift:64:22:64:22 | key |
| test2.swift:63:19:63:19 | key | test2.swift:64:22:64:22 | key |
| test2.swift:64:19:64:19 | &... | test2.swift:64:19:64:19 | d4 |
@@ -149,8 +149,8 @@
| test2.swift:66:18:66:18 | $value$generator | test2.swift:66:18:66:18 | SSA def($value$generator) |
| test2.swift:66:18:66:18 | SSA def($value$generator) | test2.swift:66:5:66:5 | $value$generator |
| test2.swift:66:18:66:18 | [post] d4 | test2.swift:69:25:69:25 | d4 |
| test2.swift:66:18:66:18 | call to makeIterator() | test2.swift:66:18:66:18 | $value$generator |
| test2.swift:66:18:66:18 | d4 | test2.swift:69:25:69:25 | d4 |
| test2.swift:66:18:66:21 | call to makeIterator() | test2.swift:66:18:66:18 | $value$generator |
| test2.swift:69:5:69:5 | $generator | test2.swift:69:5:69:5 | &... |
| test2.swift:69:5:69:5 | &... | test2.swift:69:5:69:5 | $generator |
| test2.swift:69:5:69:5 | [post] $generator | test2.swift:69:5:69:5 | &... |
@@ -181,7 +181,7 @@
| test2.swift:81:9:81:9 | ix | test2.swift:81:9:81:9 | SSA def(ix) |
| test2.swift:81:15:81:15 | $ix$generator | test2.swift:81:15:81:15 | SSA def($ix$generator) |
| test2.swift:81:15:81:15 | SSA def($ix$generator) | test2.swift:81:5:81:5 | $ix$generator |
| test2.swift:81:15:81:24 | call to makeIterator() | test2.swift:81:15:81:15 | $ix$generator |
| test2.swift:81:15:81:15 | call to makeIterator() | test2.swift:81:15:81:15 | $ix$generator |
| test2.swift:81:21:81:21 | [post] a1 | test2.swift:82:19:82:19 | a1 |
| test2.swift:81:21:81:21 | [post] a1 | test2.swift:84:20:84:20 | a1 |
| test2.swift:81:21:81:21 | a1 | test2.swift:82:19:82:19 | a1 |
@@ -199,7 +199,7 @@
| test2.swift:84:14:84:14 | v | test2.swift:84:14:84:14 | SSA def(v) |
| test2.swift:84:20:84:20 | $generator | test2.swift:84:20:84:20 | SSA def($generator) |
| test2.swift:84:20:84:20 | SSA def($generator) | test2.swift:84:5:84:5 | $generator |
| test2.swift:84:20:84:34 | call to makeIterator() | test2.swift:84:20:84:20 | $generator |
| test2.swift:84:20:84:20 | call to makeIterator() | test2.swift:84:20:84:20 | $generator |
| test2.swift:91:9:91:9 | SSA def(a2) | test2.swift:93:5:93:5 | a2 |
| test2.swift:91:9:91:9 | a2 | test2.swift:91:9:91:9 | SSA def(a2) |
| test2.swift:91:14:91:33 | [...] | test2.swift:91:9:91:9 | a2 |
@@ -223,7 +223,7 @@
| test2.swift:98:9:98:9 | ix | test2.swift:98:9:98:9 | SSA def(ix) |
| test2.swift:98:15:98:15 | $ix$generator | test2.swift:98:15:98:15 | SSA def($ix$generator) |
| test2.swift:98:15:98:15 | SSA def($ix$generator) | test2.swift:98:5:98:5 | $ix$generator |
| test2.swift:98:15:98:24 | call to makeIterator() | test2.swift:98:15:98:15 | $ix$generator |
| test2.swift:98:15:98:15 | call to makeIterator() | test2.swift:98:15:98:15 | $ix$generator |
| test2.swift:98:21:98:21 | [post] a2 | test2.swift:99:19:99:19 | a2 |
| test2.swift:98:21:98:21 | [post] a2 | test2.swift:101:20:101:20 | a2 |
| test2.swift:98:21:98:21 | a2 | test2.swift:99:19:99:19 | a2 |
@@ -241,7 +241,7 @@
| test2.swift:101:14:101:14 | v | test2.swift:101:14:101:14 | SSA def(v) |
| test2.swift:101:20:101:20 | $generator | test2.swift:101:20:101:20 | SSA def($generator) |
| test2.swift:101:20:101:20 | SSA def($generator) | test2.swift:101:5:101:5 | $generator |
| test2.swift:101:20:101:34 | call to makeIterator() | test2.swift:101:20:101:20 | $generator |
| test2.swift:101:20:101:20 | call to makeIterator() | test2.swift:101:20:101:20 | $generator |
| test.swift:5:9:5:13 | ... as ... | test.swift:5:9:5:9 | t2 |
| test.swift:6:9:6:9 | SSA def(t1) | test.swift:7:15:7:15 | t1 |
| test.swift:6:9:6:9 | t1 | test.swift:6:9:6:9 | SSA def(t1) |
@@ -1388,7 +1388,7 @@
| test.swift:891:17:891:17 | [post] $generator | test.swift:891:17:891:17 | &... |
| test.swift:891:26:891:26 | $generator | test.swift:891:26:891:26 | SSA def($generator) |
| test.swift:891:26:891:26 | SSA def($generator) | test.swift:891:17:891:17 | $generator |
| test.swift:891:26:891:30 | call to makeIterator() | test.swift:891:26:891:26 | $generator |
| test.swift:891:26:891:26 | call to makeIterator() | test.swift:891:26:891:26 | $generator |
| test.swift:892:21:892:21 | this | test.swift:891:17:891:17 | SSA phi read(this) |
| test.swift:892:21:892:21 | this | test.swift:891:17:891:17 | SSA phi read(this) |
| test.swift:898:5:898:5 | $i$generator | test.swift:898:5:898:5 | &... |

View File

@@ -1,14 +1,14 @@
| file://:0:0:0:0 | KeyPathComponent | getKind: | 7 | | | | | optional wrapping | | |
| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 3 | property | | | | | | |
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 4 | | subscript | | | | | |
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 4 | | subscript | | | | | |
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 5 | | | optional forcing | | | | |
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 8 | | | | | | self | |
| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 3 | property | | | | | | |
| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 6 | | | | optional chaining | | | |
| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 3 | property | | | | | | |
| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 3 | property | | | | | | |
| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 6 | | | | optional chaining | | | |
| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 3 | property | | | | | | |
| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 8 | | | | | | self | |
| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 9 | | | | | | | tuple indexing |
| file://:0:0:0:0 | KeyPathComponent | getKind: | 9 | | | | | optional wrapping | | |
| key_path_expr.swift:11:17:11:17 | KeyPathComponent | getKind: | 5 | property | | | | | | |
| key_path_expr.swift:12:24:12:26 | KeyPathComponent | getKind: | 6 | | subscript | | | | | |
| key_path_expr.swift:13:34:13:38 | KeyPathComponent | getKind: | 6 | | subscript | | | | | |
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 7 | | | optional forcing | | | | |
| key_path_expr.swift:14:31:14:31 | KeyPathComponent | getKind: | 10 | | | | | | self | |
| key_path_expr.swift:15:21:15:21 | KeyPathComponent | getKind: | 5 | property | | | | | | |
| key_path_expr.swift:15:24:15:24 | KeyPathComponent | getKind: | 8 | | | | optional chaining | | | |
| key_path_expr.swift:15:26:15:26 | KeyPathComponent | getKind: | 5 | property | | | | | | |
| key_path_expr.swift:16:25:16:25 | KeyPathComponent | getKind: | 5 | property | | | | | | |
| key_path_expr.swift:16:28:16:28 | KeyPathComponent | getKind: | 8 | | | | optional chaining | | | |
| key_path_expr.swift:16:30:16:30 | KeyPathComponent | getKind: | 5 | property | | | | | | |
| key_path_expr.swift:17:16:17:16 | KeyPathComponent | getKind: | 10 | | | | | | self | |
| key_path_expr.swift:18:32:18:32 | KeyPathComponent | getKind: | 11 | | | | | | | tuple indexing |

View File

@@ -151,14 +151,16 @@ methodlookup.swift:
# 30| getMethodRef(): [DeclRefExpr] staticMethod()
# 33| [TopLevelCodeDecl] { ... }
# 33| getBody(): [BraceStmt] { ... }
# 33| getElement(0): [CallExpr] call to Task<Success, Never>.init(priority:operation:)
# 33| getFunction(): [MethodLookupExpr] Task<Success, Never>.init(priority:operation:)
# 33| getElement(0): [CallExpr] call to Task<Success, Never>.init(name:priority:operation:)
# 33| getFunction(): [MethodLookupExpr] Task<Success, Never>.init(name:priority:operation:)
# 33| getBase(): [TypeExpr] Task<(), Never>.Type
# 33| getTypeRepr(): [TypeRepr] Task<(), Never>
# 33| getMethodRef(): [DeclRefExpr] Task<Success, Never>.init(priority:operation:)
# 33| getArgument(0): [Argument] priority: default priority
# 33| getMethodRef(): [DeclRefExpr] Task<Success, Never>.init(name:priority:operation:)
# 33| getArgument(0): [Argument] name: default name
# 33| getExpr(): [DefaultArgumentExpr] default name
# 33| getArgument(1): [Argument] priority: default priority
# 33| getExpr(): [DefaultArgumentExpr] default priority
# 33| getArgument(1): [Argument] operation: { ... }
# 33| getArgument(2): [Argument] operation: { ... }
# 33| getExpr(): [ExplicitClosureExpr] { ... }
# 33| getBody(): [BraceStmt] { ... }
# 34| getVariable(0): [ConcreteVarDecl] bar
@@ -189,18 +191,21 @@ methodlookup.swift:
# 40| getMethodRef(): [DeclRefExpr] staticMethod()
# 33| getExpr().getFullyConverted(): [FunctionConversionExpr] (@isolated(any) () async -> ()) ...
# 33| [NilLiteralExpr] nil
# 33| [NilLiteralExpr] nil
# 38| [Comment] // Bar.instanceMethod(bar2)() // error: actor-isolated instance method 'instanceMethod()' can not be referenced from a non-isolated context
# 38|
# 43| [TopLevelCodeDecl] { ... }
# 43| getBody(): [BraceStmt] { ... }
# 43| getElement(0): [CallExpr] call to Task<Success, Never>.init(priority:operation:)
# 43| getFunction(): [MethodLookupExpr] Task<Success, Never>.init(priority:operation:)
# 43| getElement(0): [CallExpr] call to Task<Success, Never>.init(name:priority:operation:)
# 43| getFunction(): [MethodLookupExpr] Task<Success, Never>.init(name:priority:operation:)
# 43| getBase(): [TypeExpr] Task<(), Never>.Type
# 43| getTypeRepr(): [TypeRepr] Task<(), Never>
# 43| getMethodRef(): [DeclRefExpr] Task<Success, Never>.init(priority:operation:)
# 43| getArgument(0): [Argument] priority: default priority
# 43| getMethodRef(): [DeclRefExpr] Task<Success, Never>.init(name:priority:operation:)
# 43| getArgument(0): [Argument] name: default name
# 43| getExpr(): [DefaultArgumentExpr] default name
# 43| getArgument(1): [Argument] priority: default priority
# 43| getExpr(): [DefaultArgumentExpr] default priority
# 43| getArgument(1): [Argument] operation: { ... }
# 43| getArgument(2): [Argument] operation: { ... }
# 43| getExpr(): [ExplicitClosureExpr] { ... }
# 43| getBody(): [BraceStmt] { ... }
# 44| getVariable(0): [ConcreteVarDecl] baz
@@ -265,6 +270,7 @@ methodlookup.swift:
# 51| getElement(5).getFullyConverted(): [AwaitExpr] await ...
# 43| getExpr().getFullyConverted(): [FunctionConversionExpr] (@isolated(any) () async -> ()) ...
# 43| [NilLiteralExpr] nil
# 43| [NilLiteralExpr] nil
# 47| [Comment] // DotSyntaxCallExpr
# 47|
# 48| [Comment] // DotSyntaxBaseIgnoredExpr

View File

@@ -10,12 +10,12 @@ noStaticTarget
| methodlookup.swift:27:9:27:9 | call to instanceMethod() | true |
| methodlookup.swift:29:5:29:21 | call to classMethod() | true |
| methodlookup.swift:30:5:30:22 | call to staticMethod() | true |
| methodlookup.swift:33:1:41:1 | call to Task<Success, Never>.init(priority:operation:) | true |
| methodlookup.swift:33:1:41:1 | call to Task<Success, Never>.init(name:priority:operation:) | true |
| methodlookup.swift:34:15:34:19 | call to Bar.init() | true |
| methodlookup.swift:35:9:35:18 | call to Bar.init() | true |
| methodlookup.swift:37:11:37:30 | call to instanceMethod() | true |
| methodlookup.swift:40:5:40:22 | call to staticMethod() | true |
| methodlookup.swift:43:1:52:1 | call to Task<Success, Never>.init(priority:operation:) | true |
| methodlookup.swift:43:1:52:1 | call to Task<Success, Never>.init(name:priority:operation:) | true |
| methodlookup.swift:44:21:44:25 | call to Baz.init() | true |
| methodlookup.swift:45:15:45:24 | call to Baz.init() | true |
| methodlookup.swift:47:11:47:30 | call to instanceMethod() | true |

View File

@@ -1,4 +1,4 @@
| nominaltype.swift:84:6:84:6 | i | Int | getABaseType:BitwiseCopyable, getABaseType:CVarArg, getABaseType:CodingKeyRepresentable, getABaseType:CustomReflectable, getABaseType:Decodable, getABaseType:Encodable, getABaseType:Equatable, getABaseType:FixedWidthInteger, getABaseType:Hashable, getABaseType:MirrorPath, getABaseType:SIMDScalar, getABaseType:Sendable, getABaseType:SignedInteger, getABaseType:_CustomPlaygroundQuickLookable, getABaseType:_ExpressibleByBuiltinIntegerLiteral, getABaseType:_HasCustomAnyHashableRepresentation, getCanonicalType:Int, getFullName:Int, getName:Int, getUnderlyingType:Int |
| nominaltype.swift:84:6:84:6 | i | Int | getABaseType:BitwiseCopyable, getABaseType:CVarArg, getABaseType:CodingKeyRepresentable, getABaseType:CustomReflectable, getABaseType:Decodable, getABaseType:Encodable, getABaseType:Equatable, getABaseType:FixedWidthInteger, getABaseType:Hashable, getABaseType:MirrorPath, getABaseType:SIMDScalar, getABaseType:Sendable, getABaseType:SendableMetatype, getABaseType:SignedInteger, getABaseType:_CustomPlaygroundQuickLookable, getABaseType:_ExpressibleByBuiltinIntegerLiteral, getABaseType:_HasCustomAnyHashableRepresentation, getCanonicalType:Int, getFullName:Int, getName:Int, getUnderlyingType:Int |
| nominaltype.swift:85:6:85:6 | j | Any? | getCanonicalType:Optional<Any>, getFullName:Any?, getName:Any?, getUnderlyingType:Any? |
| nominaltype.swift:86:6:86:6 | a | A | getCanonicalType:A, getFullName:A, getName:A, getUnderlyingType:A |
| nominaltype.swift:87:6:87:6 | a_alias | A_alias | getAliasedType:A, getCanonicalType:A, getFullName:A_alias, getName:A_alias, getUnderlyingType:A |

View File

@@ -1,4 +1,4 @@
| nominaltype.swift:84:6:84:6 | i | Int | getABaseType:BitwiseCopyable, getABaseType:CVarArg, getABaseType:CodingKeyRepresentable, getABaseType:CustomReflectable, getABaseType:Decodable, getABaseType:Encodable, getABaseType:Equatable, getABaseType:FixedWidthInteger, getABaseType:Hashable, getABaseType:MirrorPath, getABaseType:SIMDScalar, getABaseType:Sendable, getABaseType:SignedInteger, getABaseType:_CustomPlaygroundQuickLookable, getABaseType:_ExpressibleByBuiltinIntegerLiteral, getABaseType:_HasCustomAnyHashableRepresentation, getABaseTypeDecl:BitwiseCopyable, getABaseTypeDecl:CVarArg, getABaseTypeDecl:CodingKeyRepresentable, getABaseTypeDecl:CustomReflectable, getABaseTypeDecl:Decodable, getABaseTypeDecl:Encodable, getABaseTypeDecl:Equatable, getABaseTypeDecl:FixedWidthInteger, getABaseTypeDecl:Hashable, getABaseTypeDecl:MirrorPath, getABaseTypeDecl:SIMDScalar, getABaseTypeDecl:Sendable, getABaseTypeDecl:SignedInteger, getABaseTypeDecl:_CustomPlaygroundQuickLookable, getABaseTypeDecl:_ExpressibleByBuiltinIntegerLiteral, getABaseTypeDecl:_HasCustomAnyHashableRepresentation, getFullName:Int, getName:Int |
| nominaltype.swift:84:6:84:6 | i | Int | getABaseType:BitwiseCopyable, getABaseType:CVarArg, getABaseType:CodingKeyRepresentable, getABaseType:CustomReflectable, getABaseType:Decodable, getABaseType:Encodable, getABaseType:Equatable, getABaseType:FixedWidthInteger, getABaseType:Hashable, getABaseType:MirrorPath, getABaseType:SIMDScalar, getABaseType:Sendable, getABaseType:SendableMetatype, getABaseType:SignedInteger, getABaseType:_CustomPlaygroundQuickLookable, getABaseType:_ExpressibleByBuiltinIntegerLiteral, getABaseType:_HasCustomAnyHashableRepresentation, getABaseTypeDecl:BitwiseCopyable, getABaseTypeDecl:CVarArg, getABaseTypeDecl:CodingKeyRepresentable, getABaseTypeDecl:CustomReflectable, getABaseTypeDecl:Decodable, getABaseTypeDecl:Encodable, getABaseTypeDecl:Equatable, getABaseTypeDecl:FixedWidthInteger, getABaseTypeDecl:Hashable, getABaseTypeDecl:MirrorPath, getABaseTypeDecl:SIMDScalar, getABaseTypeDecl:Sendable, getABaseTypeDecl:SendableMetatype, getABaseTypeDecl:SignedInteger, getABaseTypeDecl:_CustomPlaygroundQuickLookable, getABaseTypeDecl:_ExpressibleByBuiltinIntegerLiteral, getABaseTypeDecl:_HasCustomAnyHashableRepresentation, getFullName:Int, getName:Int |
| nominaltype.swift:86:6:86:6 | a | A | getFullName:A, getName:A |
| nominaltype.swift:87:6:87:6 | a_alias | A_alias | getAliasedType:A, getFullName:A_alias, getName:A_alias |
| nominaltype.swift:88:6:88:6 | a_optional_alias | A_optional_alias | getAliasedType:A?, getFullName:A_optional_alias, getName:A_optional_alias |

View File

@@ -486,12 +486,14 @@ class KeyPathComponent(AstNode):
kind: int | doc("kind of key path component") | desc("""
INTERNAL: Do not use.
This is 3 for properties, 4 for array and dictionary subscripts, 5 for optional forcing
(`!`), 6 for optional chaining (`?`), 7 for implicit optional wrapping, 8 for `self`,
and 9 for tuple element indexing.
TODO: Swift 6.2 update with UnresolvedApply and Apply
The following values should not appear: 0 for invalid components, 1 for unresolved
properties, 2 for unresolved subscripts, 10 for #keyPath dictionary keys, and 11 for
This is 5 for properties, 6 for array and dictionary subscripts, 7 for optional forcing
(`!`), 8 for optional chaining (`?`), 9 for implicit optional wrapping, 10 for `self`,
and 11 for tuple element indexing.
The following values should not appear: 0 for invalid components, 2 for unresolved
properties, 3 for unresolved subscripts, 12 for #keyPath dictionary keys, and 13 for
implicit IDE code completion data.
""")
subscript_arguments : list[Argument] | child | doc(
@@ -905,20 +907,9 @@ class AvailabilitySpec(AstNode):
if #available(iOS 12, *)
```
"""
pass
class PlatformVersionAvailabilitySpec(AvailabilitySpec):
"""
An availability spec based on platform and version, for example `macOS 12` or `watchOS 14`
"""
platform: string
version: string
class OtherAvailabilitySpec(AvailabilitySpec):
"""
A wildcard availability spec `*`
"""
pass
platform: optional[string]
version: optional[string]
is_wildcard: predicate
class AvailabilityInfo(AstNode):
"""
@@ -1211,7 +1202,7 @@ class PrimaryArchetypeType(ArchetypeType):
class LocalArchetypeType(ArchetypeType):
pass
class OpenedArchetypeType(LocalArchetypeType):
class ExistentialArchetypeType(LocalArchetypeType):
pass
@qltest.test_with("PackType")

BIN
swift/third_party/resources/resource-dir-linux.zip (Stored with Git LFS) vendored

Binary file not shown.

BIN
swift/third_party/resources/resource-dir-macos.zip (Stored with Git LFS) vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -53,6 +53,12 @@ function RegisterExtractorPack(id)
strip_unsupported_arg(args, '-stack-check', 0)
strip_unsupported_arg(args, '-experimental-skip-non-inlinable-function-bodies-without-types', 0)
strip_unsupported_clang_arg(args, '-ivfsstatcache', 1)
-- The four args below are removed to workaround version mismatches due to recent versions
-- of Xcode defaulting to explicit modules:
strip_unsupported_arg(args, '-disable-implicit-swift-modules', 0)
strip_unsupported_clang_arg(args, '-fno-implicit-modules', 0)
strip_unsupported_clang_arg(args, '-fno-implicit-module-maps', 0)
strip_unsupported_arg(args, '-explicit-swift-module-map-file', 1)
end
-- xcodebuild does not always specify the -resource-dir in which case the compiler falls back