Merge pull request #19315 from github/redsun82/swift-6.1

Swift: make extractor compile again after 6.1 upgrade
This commit is contained in:
Jeroen Ketema
2025-04-25 12:34:39 +02:00
committed by GitHub
55 changed files with 11407 additions and 165 deletions

View File

@@ -0,0 +1,21 @@
class MacroRole extends @macro_role {
string toString() { none() }
}
class ExprOrNone extends @expr_or_none {
string toString() { none() }
}
class TypeExpr extends @type_expr {
string toString() { none() }
}
class UnspecifiedElement extends @unspecified_element {
string toString() { none() }
}
from MacroRole role, int index, ExprOrNone conformance
where
macro_role_conformances(role, index, conformance) and
(conformance instanceof TypeExpr or conformance instanceof UnspecifiedElement)
select role, index, conformance

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,3 @@
description: Upgrade to Swift 6.1
compatibility: partial
macro_role_conformances.rel: run macro_role_conformances.qlo

View File

@@ -155,7 +155,7 @@ static std::unordered_set<swift::ModuleDecl*> extractDeclarations(
if (primaryFile && primaryFile->getBufferID()) {
auto& sourceManager = compiler.getSourceMgr();
auto tokens = swift::tokenize(compiler.getInvocation().getLangOptions(), sourceManager,
*primaryFile->getBufferID());
primaryFile->getBufferID());
for (auto& token : tokens) {
if (token.getKind() == swift::tok::comment) {
comments.push_back(token);

View File

@@ -1,6 +1,7 @@
#pragma once
#include <swift/AST/ASTAllocated.h>
#include <llvm/ADT/DenseMap.h> // needed (but not included) by the following header
#include <swift/AST/AvailabilitySpec.h>
#include <swift/AST/Expr.h>
#include <swift/AST/SourceFile.h>

View File

@@ -177,6 +177,7 @@ MAP(swift::Expr, ExprTag)
MAP(swift::ABISafeConversionExpr, AbiSafeConversionExprTag) // different acronym convention
MAP(swift::ActorIsolationErasureExpr, ActorIsolationErasureExprTag)
MAP(swift::UnreachableExpr, UnreachableExprTag)
MAP(swift::UnsafeCastExpr, void) // TODO swift 6.1
MAP(swift::ExplicitCastExpr, ExplicitCastExprTag)
MAP(swift::CheckedCastExpr, CheckedCastExprTag)
MAP(swift::ForcedCheckedCastExpr, ForcedCheckedCastExprTag)
@@ -204,6 +205,7 @@ MAP(swift::Expr, ExprTag)
MAP(swift::SingleValueStmtExpr, SingleValueStmtExprTag)
MAP(swift::ExtractFunctionIsolationExpr, ExtractFunctionIsolationExprTag)
MAP(swift::CurrentContextIsolationExpr, CurrentContextIsolationExprTag)
MAP(swift::TypeValueExpr, void) // TODO swift 6.1
MAP(swift::Decl, DeclTag)
MAP(swift::ValueDecl, ValueDeclTag)
MAP(swift::TypeDecl, TypeDeclTag)
@@ -235,7 +237,6 @@ MAP(swift::Decl, DeclTag)
MAP(swift::ExtensionDecl, ExtensionDeclTag)
MAP(swift::TopLevelCodeDecl, TopLevelCodeDeclTag)
MAP(swift::ImportDecl, ImportDeclTag)
MAP(swift::IfConfigDecl, IfConfigDeclTag)
MAP(swift::PoundDiagnosticDecl, PoundDiagnosticDeclTag)
MAP(swift::PrecedenceGroupDecl, PrecedenceGroupDeclTag)
MAP(swift::MissingMemberDecl, MissingMemberDeclTag)
@@ -284,6 +285,8 @@ MAP(swift::TypeBase, TypeTag)
MAP(swift::BuiltinVectorType, BuiltinVectorTypeTag)
MAP(swift::BuiltinPackIndexType, void) // SIL type, cannot really appear in the frontend run
MAP(swift::BuiltinNonDefaultDistributedActorStorageType, void) // Does not appear in AST/SIL, only used during IRGen
MAP(swift::BuiltinFixedArrayType, void) // TODO swift 6.1
MAP(swift::BuiltinUnboundGenericType, void) // TODO swift 6.1
MAP(swift::TupleType, TupleTypeTag)
MAP(swift::ReferenceStorageType, ReferenceStorageTypeTag)
MAP(swift::WeakStorageType, WeakStorageTypeTag)
@@ -336,8 +339,8 @@ MAP(swift::TypeBase, TypeTag)
MAP(swift::PackElementType, PackElementTypeTag)
MAP(swift::TypeVariableType, void) // created during type checking and only used for constraint checking
MAP(swift::ErrorUnionType, void) // created during type checking and only used for constraint checking
MAP(swift::IntegerType, void) // TODO swift 6.1
MAP(swift::SugarType, SugarTypeTag)
MAP(swift::ParenType, ParenTypeTag)
MAP(swift::TypeAliasType, TypeAliasTypeTag)
MAP(swift::SyntaxSugarType, SyntaxSugarTypeTag)
MAP(swift::UnarySyntaxSugarType, UnarySyntaxSugarTypeTag)

View File

@@ -6,8 +6,8 @@
#include <swift/AST/Module.h>
#include <swift/AST/ParameterList.h>
#include <swift/AST/ASTContext.h>
#include <swift/AST/GenericEnvironment.h>
#include <swift/AST/GenericParamList.h>
#include <sstream>
using namespace codeql;
@@ -298,6 +298,12 @@ SwiftMangledName SwiftMangler::visitAnyMetatypeType(const swift::AnyMetatypeType
return initMangled(type) << fetch(type->getInstanceType());
}
SwiftMangledName SwiftMangler::visitExistentialMetatypeType(
const swift::ExistentialMetatypeType* type) {
return visitAnyMetatypeType(type)
<< fetch(const_cast<swift::ExistentialMetatypeType*>(type)->getExistentialInstanceType());
}
SwiftMangledName SwiftMangler::visitDependentMemberType(const swift::DependentMemberType* type) {
return initMangled(type) << fetch(type->getBase()) << fetch(type->getAssocType());
}
@@ -353,8 +359,9 @@ SwiftMangledName SwiftMangler::visitOpaqueTypeArchetypeType(
}
SwiftMangledName SwiftMangler::visitOpenedArchetypeType(const swift::OpenedArchetypeType* type) {
auto* env = type->getGenericEnvironment();
llvm::SmallVector<char> uuid;
type->getOpenedExistentialID().toString(uuid);
env->getOpenedExistentialUUID().toString(uuid);
return visitArchetypeType(type) << std::string_view(uuid.data(), uuid.size());
}
@@ -364,16 +371,15 @@ SwiftMangledName SwiftMangler::visitProtocolCompositionType(
for (auto composed : type->getMembers()) {
ret << fetch(composed);
}
for (auto inverse : type->getInverses()) {
ret << (uint8_t)inverse << "_";
}
if (type->hasExplicitAnyObject()) {
ret << "&AnyObject";
}
return ret;
}
SwiftMangledName SwiftMangler::visitParenType(const swift::ParenType* type) {
return initMangled(type) << fetch(type->getUnderlyingType());
}
SwiftMangledName SwiftMangler::visitLValueType(const swift::LValueType* type) {
return initMangled(type) << fetch(type->getObjectType());
}

View File

@@ -84,6 +84,7 @@ class SwiftMangler : private swift::TypeVisitor<SwiftMangler, SwiftMangledName>,
SwiftMangledName visitGenericFunctionType(const swift::GenericFunctionType* type);
SwiftMangledName visitGenericTypeParamType(const swift::GenericTypeParamType* type);
SwiftMangledName visitAnyMetatypeType(const swift::AnyMetatypeType* type);
SwiftMangledName visitExistentialMetatypeType(const swift::ExistentialMetatypeType* type);
SwiftMangledName visitDependentMemberType(const swift::DependentMemberType* type);
SwiftMangledName visitInOutType(const swift::InOutType* type);
SwiftMangledName visitExistentialType(const swift::ExistentialType* type);
@@ -94,7 +95,6 @@ class SwiftMangler : private swift::TypeVisitor<SwiftMangler, SwiftMangledName>,
SwiftMangledName visitOpaqueTypeArchetypeType(const swift::OpaqueTypeArchetypeType* type);
SwiftMangledName visitOpenedArchetypeType(const swift::OpenedArchetypeType* type);
SwiftMangledName visitProtocolCompositionType(const swift::ProtocolCompositionType* type);
SwiftMangledName visitParenType(const swift::ParenType* type);
SwiftMangledName visitLValueType(const swift::LValueType* type);
SwiftMangledName visitDynamicSelfType(const swift::DynamicSelfType* type);
SwiftMangledName visitUnboundGenericType(const swift::UnboundGenericType* type);

View File

@@ -334,14 +334,6 @@ void DeclTranslator::fillAbstractStorageDecl(const swift::AbstractStorageDecl& d
fillValueDecl(decl, entry);
}
codeql::IfConfigDecl DeclTranslator::translateIfConfigDecl(const swift::IfConfigDecl& decl) {
auto entry = createEntry(decl);
if (auto activeClause = decl.getActiveClause()) {
entry.active_elements = dispatcher.fetchRepeatedLabels(activeClause->Elements);
}
return entry;
}
codeql::OpaqueTypeDecl DeclTranslator::translateOpaqueTypeDecl(const swift::OpaqueTypeDecl& decl) {
auto entry = createEntry(decl);
fillTypeDecl(decl, entry);

View File

@@ -44,7 +44,6 @@ class DeclTranslator : public AstTranslatorBase<DeclTranslator> {
codeql::ExtensionDecl translateExtensionDecl(const swift::ExtensionDecl& decl);
codeql::ImportDecl translateImportDecl(const swift::ImportDecl& decl);
codeql::ModuleDecl translateModuleDecl(const swift::ModuleDecl& decl);
codeql::IfConfigDecl translateIfConfigDecl(const swift::IfConfigDecl& decl);
codeql::OpaqueTypeDecl translateOpaqueTypeDecl(const swift::OpaqueTypeDecl& decl);
codeql::PoundDiagnosticDecl translatePoundDiagnosticDecl(const swift::PoundDiagnosticDecl& decl);
codeql::MissingMemberDecl translateMissingMemberDecl(const swift::MissingMemberDecl& decl);

View File

@@ -477,7 +477,11 @@ codeql::ErrorExpr ExprTranslator::translateErrorExpr(const swift::ErrorExpr& exp
void ExprTranslator::fillClosureExpr(const swift::AbstractClosureExpr& expr,
codeql::ClosureExpr& entry) {
entry.body = dispatcher.fetchLabel(expr.getBody());
entry.captures = dispatcher.fetchRepeatedLabels(expr.getCaptureInfo().getCaptures());
if (expr.getCaptureInfo().hasBeenComputed()) {
entry.captures = dispatcher.fetchRepeatedLabels(expr.getCaptureInfo().getCaptures());
} else {
LOG_ERROR("Unable to get CaptureInfo");
}
CODEQL_EXPECT_OR(return, expr.getParameters(), "AbstractClosureExpr has null getParameters()");
entry.params = dispatcher.fetchRepeatedLabels(*expr.getParameters());
}
@@ -624,7 +628,7 @@ codeql::AppliedPropertyWrapperExpr ExprTranslator::translateAppliedPropertyWrapp
codeql::RegexLiteralExpr ExprTranslator::translateRegexLiteralExpr(
const swift::RegexLiteralExpr& expr) {
auto entry = createExprEntry(expr);
auto pattern = expr.getRegexText();
auto pattern = expr.getParsedRegexText();
// the pattern has enclosing '/' delimiters, we'd rather get it without
entry.pattern = pattern.substr(1, pattern.size() - 2);
entry.version = expr.getVersion();

View File

@@ -76,12 +76,6 @@ codeql::DependentMemberType TypeTranslator::translateDependentMemberType(
return entry;
}
codeql::ParenType TypeTranslator::translateParenType(const swift::ParenType& type) {
auto entry = createTypeEntry(type);
entry.type = dispatcher.fetchLabel(type.getUnderlyingType());
return entry;
}
codeql::OptionalType TypeTranslator::translateOptionalType(const swift::OptionalType& type) {
auto entry = createTypeEntry(type);
fillUnarySyntaxSugarType(type, entry);

View File

@@ -24,7 +24,6 @@ class TypeTranslator : public TypeTranslatorBase<TypeTranslator> {
const swift::ExistentialMetatypeType& type);
codeql::TypeAliasType translateTypeAliasType(const swift::TypeAliasType& type);
codeql::DependentMemberType translateDependentMemberType(const swift::DependentMemberType& type);
codeql::ParenType translateParenType(const swift::ParenType& type);
codeql::UnarySyntaxSugarType translateUnarySyntaxSugarType(
const swift::UnarySyntaxSugarType& type);
codeql::OptionalType translateOptionalType(const swift::OptionalType& type);

View File

@@ -12,7 +12,7 @@ lib/codeql/swift/elements/File.qll 642fde19ad366151c71ccb44c32b6063c3374d7169ada
lib/codeql/swift/elements/KeyPathComponent.qll cc64d5a3cc6e6aa12faee7dfc95e6b5e10d0adb9bc10d815a93a3a61fd70e535 ab82cebb73753bf72ef8f79c271851dc7e738a25c7100b634630f4363ceec061
lib/codeql/swift/elements/Locatable.qll a4e01abd3f337a60e3741705cede50be974ccffcb707a53f2b378972838c5977 89ba4dbebcfa291797407c27087d91a18b1ec1bc97140a14ec08dbb12cef7395
lib/codeql/swift/elements/Location.qll db213e8e27f8d732ad472c16929f2c503634c622d4d7b6b6977ed8b7b3c71c5b 9b951af94891848ecea9a690741e4a401c4b7ad676fd1fcee703fce4dcee2da4
lib/codeql/swift/elements/MacroRole.qll 2e814f75c578763570addab34c423245e4e68dba651ac9df05441b25c7ce6186 8822c126e2e19e9f7a2eb7035408acff3ac1d99ccb87def2a3b1d26dcfaeccfe
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
@@ -719,12 +719,12 @@ lib/codeql/swift/generated/File.qll 476ac95566ef0080e0ad8c3da144b1be1d945d2f33a2
lib/codeql/swift/generated/KeyPathComponent.qll 5276acdc9a4ff0ec0cc8af615c04043391fb99613731ddcc86db4e47b37c8c5a ccc0931bbd6cc2cfae5037c2ee17bbdcbd87536f5fed90d07e73065c016c4382
lib/codeql/swift/generated/Locatable.qll 1d37fa20de71c0b9986bfd7a7c0cb82ab7bf3fda2d2008700f955ad82ce109a7 e97d4d4fb8a4800e0008cc00f60c8ed9b1ebd5f1140fd85e68b034616178d721
lib/codeql/swift/generated/Location.qll 5e20316c3e480ddfe632b7e88e016c19f10a67df1f6ae9c8f128755a6907d6f5 5a0af2d070bcb2ed53d6d0282bf9c60dc64c2dce89c21fdd485e9c7893c1c8fa
lib/codeql/swift/generated/MacroRole.qll 0d8fa6b0b6e2045d9097a87d53888cae2ea5371b2fa7d140341cf206f575b556 ea3b8a7c0a88851809f9a5a5aa80b0d2da3c4779bb29044cdba2b60246a2722c
lib/codeql/swift/generated/MacroRole.qll facf907e75490d69cd401c491215e4719324d751f40ea46c86ccf24cf3663c1f 969d8d4b44e3f1a9c193a152a4d83a303e56d2dbb871fc920c47a33f699cf018
lib/codeql/swift/generated/OtherAvailabilitySpec.qll d9feaa2a71acff3184ca389045b0a49d09156210df0e034923d715b432ad594b 046737621a8bcf69bf805afb0cff476bd15259f12f0d77fce3206dd01b31518f
lib/codeql/swift/generated/ParentChild.qll 7c9537f74a4c5a02622ce28c3de4b0ce02a7027d2e9aea9a860ece6a1e2ec340 49c1993b2a96df66903bffde78d63d8f4c68b2d604c419b20d88b63406366156
lib/codeql/swift/generated/PlatformVersionAvailabilitySpec.qll dc17b49a90a18a8f7607adf2433bc8f0c194fa3e803aa3822f809d4d4fbd6793 be48ea9f8ae17354c8508aaed24337a9e57ce01f288fece3dcecd99776cabcec
lib/codeql/swift/generated/PureSynthConstructors.qll bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4 bc31a6c4d142fa3fbdcae69d5ba6f1cec00eb9ad92b46c8d7b91ebfa7ef6c1f4
lib/codeql/swift/generated/Raw.qll 522f8500ce46d62fca22730ade5fa4716452adece25ffc36c50582b653f2fe6f 4d870e0695fff541c1a14eadc8ba51960a264ba2e6e53d0ccc32b34c7fd2cadd
lib/codeql/swift/generated/Raw.qll 6012194c54f8992401dffc0916b5790cdf581f18ac7b884379362dc807a52706 f9538fdfb326b715fdbc47e9e8b310df684d5a34519f751a65b3a4a75e430ce9
lib/codeql/swift/generated/Synth.qll a14dddab40979df82d30b2d73407fe0058a803ed6e1a882cd9a6ae5ffd240526 0879d2476a42123b46eee216d4ea03523e0c04fe0b68d9a68e0046253edb1bc9
lib/codeql/swift/generated/SynthConstructors.qll f64121911e082aa15478eb8779025cee96e97503724c02aff31741e65a894a4b f64121911e082aa15478eb8779025cee96e97503724c02aff31741e65a894a4b
lib/codeql/swift/generated/UnknownFile.qll 247ddf2ebb49ce5ed4bf7bf91a969ddff37de6c78d43d8affccaf7eb586e06f2 452b29f0465ef45e978ef8b647b75e5a2a1e53f2a568fc003bc8f52f73b3fa4d

View File

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

View File

@@ -5,7 +5,7 @@
private import internal.MacroRoleImpl
import codeql.swift.elements.AstNode
import codeql.swift.elements.expr.TypeExpr
import codeql.swift.elements.expr.Expr
/**
* The role of a macro, for example #freestanding(declaration) or @attached(member).

View File

@@ -7,7 +7,7 @@
private import codeql.swift.generated.Synth
private import codeql.swift.generated.Raw
import codeql.swift.elements.internal.AstNodeImpl::Impl as AstNodeImpl
import codeql.swift.elements.expr.TypeExpr
import codeql.swift.elements.expr.Expr
/**
* INTERNAL: This module contains the fully generated definition of `MacroRole` and should not
@@ -44,9 +44,9 @@ module Generated {
* This includes nodes from the "hidden" AST. It can be overridden in subclasses to change the
* behavior of both the `Immediate` and non-`Immediate` versions.
*/
TypeExpr getImmediateConformance(int index) {
Expr getImmediateConformance(int index) {
result =
Synth::convertTypeExprFromRaw(Synth::convertMacroRoleToRaw(this)
Synth::convertExprFromRaw(Synth::convertMacroRoleToRaw(this)
.(Raw::MacroRole)
.getConformance(index))
}
@@ -54,8 +54,8 @@ module Generated {
/**
* Gets the `index`th conformance of this macro role (0-based).
*/
final TypeExpr getConformance(int index) {
exists(TypeExpr immediate |
final Expr getConformance(int index) {
exists(Expr immediate |
immediate = this.getImmediateConformance(index) and
result = immediate.resolve()
)
@@ -64,7 +64,7 @@ module Generated {
/**
* Gets any of the conformances of this macro role.
*/
final TypeExpr getAConformance() { result = this.getConformance(_) }
final Expr getAConformance() { result = this.getConformance(_) }
/**
* Gets the number of conformances of this macro role.

View File

@@ -266,7 +266,7 @@ module Raw {
/**
* Gets the `index`th conformance of this macro role (0-based).
*/
TypeExpr getConformance(int index) { macro_role_conformances(this, index, result) }
Expr getConformance(int index) { macro_role_conformances(this, index, result) }
/**
* Gets the `index`th name of this macro role (0-based).

View File

@@ -210,7 +210,7 @@ macro_roles(
macro_role_conformances(
int id: @macro_role ref,
int index: int ref,
int conformance: @type_expr_or_none ref
int conformance: @expr_or_none ref
);
#keyset[id, index]
@@ -2794,11 +2794,6 @@ variadic_sequence_types( //dir=type
| @unspecified_element
;
@type_expr_or_none =
@type_expr
| @unspecified_element
;
@type_repr_or_none =
@type_repr
| @unspecified_element

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,2 @@
description: Upgrade to Swift 6.1
compatibility: full

View File

@@ -264,9 +264,6 @@
| declarations.swift:155:1:155:28 | { ... } | |
| declarations.swift:155:5:155:5 | d | |
| declarations.swift:157:1:180:1 | ifConfig() | |
| declarations.swift:158:3:166:3 | #if ... | |
| declarations.swift:168:3:171:3 | #if ... | |
| declarations.swift:173:3:179:3 | #if ... | |
| declarations.swift:182:1:182:10 | B | |
| declarations.swift:182:7:182:7 | B.deinit() | |
| declarations.swift:182:7:182:7 | B.init() | |

View File

@@ -1,5 +1,3 @@
deadEnd
| file://:0:0:0:0 | ... = ... |
| file://:0:0:0:0 | ... = ... |
| unspecified.swift:12:20:12:21 | (...) |
| unspecified.swift:25:9:28:9 | switch ErrorExpr { ... } |

View File

@@ -1,4 +1,5 @@
| file://:0:0:0:0 | ... .combine(_:) | UnresolvedDotExpr |
| file://:0:0:0:0 | <<error type>> | ErrorType |
| file://:0:0:0:0 | <<error type>> | ErrorType |
| file://:0:0:0:0 | <<error type>> | ErrorType |
| overloaded.swift:6:5:6:5 | OverloadedDeclRefExpr | OverloadedDeclRefExpr |
| unresolved.swift:5:1:5:14 | UnresolvedSpecializeExpr | UnresolvedSpecializeExpr |

View File

@@ -101,7 +101,7 @@ closures.swift:
# 24| getSubExpr(): [CallExpr] call to ...
# 24| getFunction(): [BindOptionalExpr] ...?
# 24| getSubExpr(): [DeclRefExpr] escape
# 24| getFunction().getFullyConverted(): [LoadExpr] ((() -> ())) ...
# 24| getFunction().getFullyConverted(): [LoadExpr] (() -> ()) ...
# 24| getSubExpr().getFullyConverted(): [InjectIntoOptionalExpr] (()?) ...
# 24| getCapture(0): [CapturedDecl] escape
# 27| [NamedFunction] logical()
@@ -145,8 +145,8 @@ closures.swift:
# 30| getArgument(0): [Argument] : ... .!=(_:_:) ...
# 30| getExpr(): [BinaryExpr] ... .!=(_:_:) ...
# 30| getFunction(): [MethodLookupExpr] .!=(_:_:)
# 30| getBase(): [TypeExpr] Optional<((Int) -> Int)>.Type
# 30| getTypeRepr(): [TypeRepr] Optional<((Int) -> Int)>
# 30| getBase(): [TypeExpr] Optional<(Int) -> Int>.Type
# 30| getTypeRepr(): [TypeRepr] Optional<(Int) -> Int>
# 30| getMethodRef(): [DeclRefExpr] !=(_:_:)
# 30| getArgument(0): [Argument] : f
# 30| getExpr(): [DeclRefExpr] f

View File

@@ -1 +0,0 @@
| if_config.swift:1:1:10:1 | #if ... | getModule: | file://:0:0:0:0 | if_config | getNumberOfMembers: | 0 | getNumberOfActiveElements: | 3 |

View File

@@ -1,3 +0,0 @@
| if_config.swift:1:1:10:1 | #if ... | 0 | if_config.swift:8:1:8:16 | { ... } |
| if_config.swift:1:1:10:1 | #if ... | 1 | if_config.swift:8:5:8:5 | baz |
| if_config.swift:1:1:10:1 | #if ... | 2 | if_config.swift:9:1:9:12 | { ... } |

View File

@@ -57,7 +57,3 @@
| param_decls.swift:41:10:41:26 | projectedValue | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 0 | getName: | projectedValue | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no |
| param_decls.swift:48:18:48:22 | p1 | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | p1 | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | yes | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | yes |
| param_decls.swift:49:26:49:30 | p2 | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | p2 | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | yes | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | yes |
| param_decls.swift:50:31:50:31 | value | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 0 | getName: | value | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no |
| param_decls.swift:50:31:50:35 | p3 | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | p3 | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | yes | hasPropertyWrapperProjectionVar: | yes | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | yes |
| param_decls.swift:51:38:51:38 | value | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Bool | getNumberOfAccessors: | 0 | getName: | value | getType: | Bool | hasAttachedPropertyWrapperType: | no | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | no |
| param_decls.swift:51:38:51:42 | p4 | getModule: | file://:0:0:0:0 | param_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | p4 | getType: | Int | hasAttachedPropertyWrapperType: | yes | hasParentPattern: | no | hasParentInitializer: | no | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | yes | hasPropertyWrapperProjectionVarBinding: | yes | hasPropertyWrapperProjectionVar: | yes | isInout: | no | hasPropertyWrapperLocalWrappedVarBinding: | no | hasPropertyWrapperLocalWrappedVar: | yes |

View File

@@ -1,4 +1,2 @@
| param_decls.swift:48:18:48:22 | p1 | Wrapper |
| param_decls.swift:49:26:49:30 | p2 | WrapperWithInit |
| param_decls.swift:50:31:50:35 | p3 | WrapperWithProjected |
| param_decls.swift:51:38:51:42 | p4 | WrapperWithProjectedAndInit |

View File

@@ -1,4 +1,2 @@
| param_decls.swift:48:18:48:22 | p1 | param_decls.swift:48:18:48:18 | _p1 |
| param_decls.swift:49:26:49:30 | p2 | param_decls.swift:49:26:49:26 | _p2 |
| param_decls.swift:50:31:50:35 | p3 | file://:0:0:0:0 | _p3 |
| param_decls.swift:51:38:51:42 | p4 | file://:0:0:0:0 | _p4 |

View File

@@ -1,4 +1,2 @@
| param_decls.swift:48:18:48:22 | p1 | param_decls.swift:48:18:48:18 | p1 |
| param_decls.swift:49:26:49:30 | p2 | param_decls.swift:49:26:49:26 | p2 |
| param_decls.swift:50:31:50:35 | p3 | param_decls.swift:50:31:50:31 | p3 |
| param_decls.swift:51:38:51:42 | p4 | param_decls.swift:51:38:51:38 | p4 |

View File

@@ -1,2 +0,0 @@
| param_decls.swift:50:31:50:35 | p3 | param_decls.swift:50:31:50:31 | $p3 |
| param_decls.swift:51:38:51:42 | p4 | param_decls.swift:51:38:51:38 | $p4 |

View File

@@ -1,2 +0,0 @@
| param_decls.swift:50:31:50:35 | p3 | file://:0:0:0:0 | var ... = ... |
| param_decls.swift:51:38:51:42 | p4 | file://:0:0:0:0 | var ... = ... |

View File

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

View File

@@ -1,3 +0,0 @@
| applied_property_wrapper.swift:14:8:14:8 | AppliedPropertyWrapperExpr | hasType: | yes | getKind: | 1 | getValue: | applied_property_wrapper.swift:14:8:14:8 | 42 | getParam: | applied_property_wrapper.swift:12:19:12:22 | x |
| applied_property_wrapper.swift:15:9:15:9 | AppliedPropertyWrapperExpr | hasType: | yes | getKind: | 2 | getValue: | applied_property_wrapper.swift:15:9:15:9 | true | getParam: | applied_property_wrapper.swift:12:19:12:22 | x |
| file://:0:0:0:0 | AppliedPropertyWrapperExpr | hasType: | yes | getKind: | 1 | getValue: | file://:0:0:0:0 | y | getParam: | applied_property_wrapper.swift:17:26:17:29 | y |

View File

@@ -1,3 +0,0 @@
| applied_property_wrapper.swift:14:8:14:8 | AppliedPropertyWrapperExpr | Wrapper |
| applied_property_wrapper.swift:15:9:15:9 | AppliedPropertyWrapperExpr | Wrapper |
| file://:0:0:0:0 | AppliedPropertyWrapperExpr | Wrapper |

View File

@@ -9,11 +9,17 @@
init(projectedValue: Bool) {}
}
func foo(@Wrapper x: Int) {}
func foo(
// @Wrapper x: Int // Disabled causes crashes with Swift 6.1
) {}
foo(x: 42)
foo($x: true)
// foo(x: 42)
// foo($x: true)
let closure = {(@Wrapper y: Int) in return }
let closure = {
(
// @Wrapper y: Int // Disabled causes crashes with Swift 6.1
) in return
}
closure(41)
// closure(41)

View File

@@ -1,9 +1,9 @@
| identity_expressions.swift:5:9:5:14 | .self | A |
| identity_expressions.swift:5:9:5:21 | .self | @lvalue Int |
| identity_expressions.swift:5:28:5:31 | (...) | (Int) |
| identity_expressions.swift:9:5:9:9 | (...) | (A) |
| identity_expressions.swift:12:28:12:43 | (...) | (A) |
| identity_expressions.swift:5:28:5:31 | (...) | Int |
| identity_expressions.swift:9:5:9:9 | (...) | A |
| identity_expressions.swift:12:28:12:43 | (...) | A |
| identity_expressions.swift:12:29:12:42 | await ... | A |
| identity_expressions.swift:15:5:15:21 | await ... | () |
| identity_expressions.swift:15:11:15:19 | (...) | (() async -> ()) |
| identity_expressions.swift:15:11:15:19 | (...) | () async -> () |
| identity_expressions.swift:18:9:18:17 | BorrowExpr | Int |

View File

@@ -1,3 +1,3 @@
| object_literals.swift:5:5:5:42 | #fileLiteral(...) | hasType: | no | getKind: | 0 | getNumberOfArguments: | 1 |
| object_literals.swift:6:5:6:61 | #colorLiteral(...) | hasType: | no | getKind: | 2 | getNumberOfArguments: | 4 |
| object_literals.swift:7:5:7:44 | #imageLiteral(...) | hasType: | no | getKind: | 1 | getNumberOfArguments: | 1 |
| object_literals.swift:5:5:5:42 | #fileLiteral(...) | hasType: | yes | getKind: | 0 | getNumberOfArguments: | 1 |
| object_literals.swift:6:5:6:61 | #colorLiteral(...) | hasType: | yes | getKind: | 2 | getNumberOfArguments: | 4 |
| object_literals.swift:7:5:7:44 | #imageLiteral(...) | hasType: | yes | getKind: | 1 | getNumberOfArguments: | 1 |

View File

@@ -0,0 +1,3 @@
| object_literals.swift:5:5:5:42 | #fileLiteral(...) | <<error type>> |
| object_literals.swift:6:5:6:61 | #colorLiteral(...) | <<error type>> |
| object_literals.swift:7:5:7:44 | #imageLiteral(...) | <<error type>> |

View File

@@ -1,7 +1,7 @@
//codeql-extractor-expected-status: 1
// These require Foundation and UIKit/AppKit to really work
// That is why compilation will fail and the entities will not have a type
// That is why compilation will fail and the entities will have error types
_ = #fileLiteral(resourceName: "file.txt")
_ = #colorLiteral(red: 255, green: 255, blue: 255, alpha: 50)
_ = #imageLiteral(resourceName: "image.gif")

View File

@@ -1,5 +1,5 @@
@_moveOnly
struct S {
struct S : ~Copyable {
__consuming func f() {
discard self
}

View File

@@ -1,4 +1,3 @@
| P1 & (P2 & P3) | getName: | P1 & (P2 & P3) | getCanonicalType: | P1 & P2 & P3 | getNumberOfMembers: | 2 |
| P1 & P2 & P3 | getName: | P1 & P2 & P3 | getCanonicalType: | P1 & P2 & P3 | getNumberOfMembers: | 3 |
| P1 & P23 | getName: | P1 & P23 | getCanonicalType: | P1 & P2 & P3 | getNumberOfMembers: | 2 |
| P2 & P4 | getName: | P2 & P4 | getCanonicalType: | P2 & P4 | getNumberOfMembers: | 2 |

View File

@@ -1,5 +1,3 @@
| P1 & (P2 & P3) | 0 | P1 |
| P1 & (P2 & P3) | 1 | (P2 & P3) |
| P1 & P2 & P3 | 0 | P1 |
| P1 & P2 & P3 | 1 | P2 |
| P1 & P2 & P3 | 2 | P3 |

View File

@@ -63,9 +63,9 @@
| patterns.swift:78:9:78:13 | ... as ... | MyEnum |
| patterns.swift:81:10:81:11 | .myNone | MyEnum |
| patterns.swift:83:10:83:25 | .mySingle(...) | MyEnum |
| patterns.swift:83:19:83:25 | (...) | (Int) |
| patterns.swift:83:20:83:24 | let ... | (Int) |
| patterns.swift:83:24:83:24 | a | (Int) |
| patterns.swift:83:19:83:25 | (...) | Int |
| patterns.swift:83:20:83:24 | let ... | Int |
| patterns.swift:83:24:83:24 | a | Int |
| patterns.swift:85:10:85:30 | .myPair(...) | MyEnum |
| patterns.swift:85:17:85:30 | (...) | (Int, Int) |
| patterns.swift:85:18:85:22 | let ... | Int |
@@ -78,9 +78,9 @@
| patterns.swift:88:22:88:22 | a | Int |
| patterns.swift:88:25:88:25 | _ | MyEnum |
| patterns.swift:92:13:92:28 | .mySingle(...) | MyEnum |
| patterns.swift:92:22:92:28 | (...) | (Int) |
| patterns.swift:92:23:92:27 | let ... | (Int) |
| patterns.swift:92:27:92:27 | x | (Int) |
| patterns.swift:92:22:92:28 | (...) | Int |
| patterns.swift:92:23:92:27 | let ... | Int |
| patterns.swift:92:27:92:27 | x | Int |
| patterns.swift:95:13:95:33 | .myPair(...) | MyEnum |
| patterns.swift:95:20:95:33 | (...) | (Int, Int) |
| patterns.swift:95:21:95:25 | let ... | Int |
@@ -89,9 +89,9 @@
| patterns.swift:95:32:95:32 | y | Int |
| patterns.swift:103:10:103:11 | .myNone | MyEnum |
| patterns.swift:105:10:105:25 | .mySingle(...) | MyEnum |
| patterns.swift:105:19:105:25 | (...) | (Int) |
| patterns.swift:105:20:105:24 | let ... | (Int) |
| patterns.swift:105:24:105:24 | a | (Int) |
| patterns.swift:105:19:105:25 | (...) | Int |
| patterns.swift:105:20:105:24 | let ... | Int |
| patterns.swift:105:24:105:24 | a | Int |
| patterns.swift:107:10:107:30 | .myPair(...) | MyEnum |
| patterns.swift:107:17:107:30 | (...) | (Int, Int) |
| patterns.swift:107:18:107:22 | let ... | Int |
@@ -104,9 +104,9 @@
| patterns.swift:110:22:110:22 | a | Int |
| patterns.swift:110:25:110:25 | _ | MyEnum |
| patterns.swift:114:13:114:28 | .mySingle(...) | MyEnum |
| patterns.swift:114:22:114:28 | (...) | (Int) |
| patterns.swift:114:23:114:27 | let ... | (Int) |
| patterns.swift:114:27:114:27 | x | (Int) |
| patterns.swift:114:22:114:28 | (...) | Int |
| patterns.swift:114:23:114:27 | let ... | Int |
| patterns.swift:114:27:114:27 | x | Int |
| patterns.swift:117:13:117:33 | .myPair(...) | MyEnum |
| patterns.swift:117:20:117:33 | (...) | (Int, Int) |
| patterns.swift:117:21:117:25 | let ... | Int |
@@ -115,9 +115,9 @@
| patterns.swift:117:32:117:32 | y | Int |
| patterns.swift:125:10:125:11 | .myNone | MyEnum |
| patterns.swift:127:10:127:25 | .mySingle(...) | MyEnum |
| patterns.swift:127:19:127:25 | (...) | (Int) |
| patterns.swift:127:20:127:24 | let ... | (Int) |
| patterns.swift:127:24:127:24 | a | (Int) |
| patterns.swift:127:19:127:25 | (...) | Int |
| patterns.swift:127:20:127:24 | let ... | Int |
| patterns.swift:127:24:127:24 | a | Int |
| patterns.swift:129:10:129:30 | .myPair(...) | MyEnum |
| patterns.swift:129:17:129:30 | (...) | (Int, Int) |
| patterns.swift:129:18:129:22 | let ... | Int |
@@ -130,9 +130,9 @@
| patterns.swift:132:22:132:22 | a | Int |
| patterns.swift:132:25:132:25 | _ | MyEnum |
| patterns.swift:136:13:136:28 | .mySingle(...) | MyEnum |
| patterns.swift:136:22:136:28 | (...) | (Int) |
| patterns.swift:136:23:136:27 | let ... | (Int) |
| patterns.swift:136:27:136:27 | x | (Int) |
| patterns.swift:136:22:136:28 | (...) | Int |
| patterns.swift:136:23:136:27 | let ... | Int |
| patterns.swift:136:27:136:27 | x | Int |
| patterns.swift:139:13:139:33 | .myPair(...) | MyEnum |
| patterns.swift:139:20:139:33 | (...) | (Int, Int) |
| patterns.swift:139:21:139:25 | let ... | Int |
@@ -143,9 +143,9 @@
| patterns.swift:144:9:144:12 | ... as ... | MyEnum |
| patterns.swift:147:10:147:11 | .myNone | MyEnum |
| patterns.swift:149:10:149:25 | .mySingle(...) | MyEnum |
| patterns.swift:149:19:149:25 | (...) | (Int) |
| patterns.swift:149:20:149:24 | let ... | (Int) |
| patterns.swift:149:24:149:24 | a | (Int) |
| patterns.swift:149:19:149:25 | (...) | Int |
| patterns.swift:149:20:149:24 | let ... | Int |
| patterns.swift:149:24:149:24 | a | Int |
| patterns.swift:151:10:151:30 | .myPair(...) | MyEnum |
| patterns.swift:151:17:151:30 | (...) | (Int, Int) |
| patterns.swift:151:18:151:22 | let ... | Int |
@@ -166,9 +166,9 @@
| patterns.swift:158:22:158:22 | a | Int |
| patterns.swift:158:25:158:25 | _ | MyEnum |
| patterns.swift:162:13:162:28 | .mySingle(...) | MyEnum |
| patterns.swift:162:22:162:28 | (...) | (Int) |
| patterns.swift:162:23:162:27 | let ... | (Int) |
| patterns.swift:162:27:162:27 | x | (Int) |
| patterns.swift:162:22:162:28 | (...) | Int |
| patterns.swift:162:23:162:27 | let ... | Int |
| patterns.swift:162:27:162:27 | x | Int |
| patterns.swift:165:13:165:39 | .myPair(...) | MyEnum |
| patterns.swift:165:26:165:39 | (...) | (Int, Int) |
| patterns.swift:165:27:165:31 | let ... | Int |

View File

@@ -853,7 +853,7 @@ cfg.swift:
# 144| [ConcreteVarDecl] $match
# 144| Type = Int
# 156| [ConcreteVarDecl] x
# 156| Type = (Int)
# 156| Type = Int
# 163| [NamedFunction] testDefer(x:)
# 163| InterfaceType = (inout Int) -> ()
# 163| getParam(0): [ParamDecl] x
@@ -3109,16 +3109,13 @@ cfg.swift:
# 467| [NamedFunction] testIfConfig()
# 467| InterfaceType = () -> ()
# 467| getBody(): [BraceStmt] { ... }
# 468| getElement(0): [IfConfigDecl] #if ...
# 472| getElement(1): [IntegerLiteralExpr] 3
# 473| getElement(2): [IntegerLiteralExpr] 4
# 476| getElement(3): [IntegerLiteralExpr] 5
# 478| getElement(4): [IfConfigDecl] #if ...
# 483| getElement(5): [IntegerLiteralExpr] 8
# 485| getElement(6): [IfConfigDecl] #if ...
# 489| getElement(7): [IntegerLiteralExpr] 11
# 490| getElement(8): [IntegerLiteralExpr] 12
# 493| getElement(9): [IntegerLiteralExpr] 13
# 472| getElement(0): [IntegerLiteralExpr] 3
# 473| getElement(1): [IntegerLiteralExpr] 4
# 476| getElement(2): [IntegerLiteralExpr] 5
# 483| getElement(3): [IntegerLiteralExpr] 8
# 489| getElement(4): [IntegerLiteralExpr] 11
# 490| getElement(5): [IntegerLiteralExpr] 12
# 493| getElement(6): [IntegerLiteralExpr] 13
# 496| [NamedFunction] testAvailable()
# 496| InterfaceType = () -> Int
# 496| getBody(): [BraceStmt] { ... }
@@ -4587,14 +4584,11 @@ declarations.swift:
# 157| [NamedFunction] ifConfig()
# 157| InterfaceType = () -> ()
# 157| getBody(): [BraceStmt] { ... }
# 158| getElement(0): [IfConfigDecl] #if ...
# 163| getElement(1): [IntegerLiteralExpr] 4
# 164| getElement(2): [IntegerLiteralExpr] 5
# 165| getElement(3): [IntegerLiteralExpr] 6
# 168| getElement(4): [IfConfigDecl] #if ...
# 173| getElement(5): [IfConfigDecl] #if ...
# 174| getElement(6): [IntegerLiteralExpr] 9
# 175| getElement(7): [IntegerLiteralExpr] 10
# 163| getElement(0): [IntegerLiteralExpr] 4
# 164| getElement(1): [IntegerLiteralExpr] 5
# 165| getElement(2): [IntegerLiteralExpr] 6
# 174| getElement(3): [IntegerLiteralExpr] 9
# 175| getElement(4): [IntegerLiteralExpr] 10
# 182| [ClassDecl] B
# 182| getMember(0): [Deinitializer] B.deinit()
# 182| InterfaceType = (B) -> () -> ()
@@ -6405,7 +6399,7 @@ patterns.swift:
# 83| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
# 83| getSubPattern(): [BindingPattern] let ...
# 83| getVariable(0): [ConcreteVarDecl] a
# 83| Type = (Int)
# 83| Type = Int
# 84| getBody(): [BraceStmt] { ... }
# 84| getElement(0): [CallExpr] call to sink(arg:)
# 84| getFunction(): [DeclRefExpr] sink(arg:)
@@ -6505,7 +6499,7 @@ patterns.swift:
# 105| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
# 105| getSubPattern(): [BindingPattern] let ...
# 105| getVariable(0): [ConcreteVarDecl] a
# 105| Type = (Int)
# 105| Type = Int
# 106| getBody(): [BraceStmt] { ... }
# 106| getElement(0): [CallExpr] call to sink(arg:)
# 106| getFunction(): [DeclRefExpr] sink(arg:)
@@ -6607,7 +6601,7 @@ patterns.swift:
# 127| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
# 127| getSubPattern(): [BindingPattern] let ...
# 127| getVariable(0): [ConcreteVarDecl] a
# 127| Type = (Int)
# 127| Type = Int
# 128| getBody(): [BraceStmt] { ... }
# 128| getElement(0): [CallExpr] call to sink(arg:)
# 128| getFunction(): [DeclRefExpr] sink(arg:)
@@ -6710,7 +6704,7 @@ patterns.swift:
# 149| getSubPattern().getFullyUnresolved(): [ParenPattern] (...)
# 149| getSubPattern(): [BindingPattern] let ...
# 149| getVariable(0): [ConcreteVarDecl] a
# 149| Type = (Int)
# 149| Type = Int
# 150| getBody(): [BraceStmt] { ... }
# 150| getElement(0): [CallExpr] call to sink(arg:)
# 150| getFunction(): [DeclRefExpr] sink(arg:)
@@ -6904,25 +6898,25 @@ patterns.swift:
# 181| getBody(): [BraceStmt] { ... }
# 181| getElement(0): [TupleExpr] (...)
# 92| [ConcreteVarDecl] x
# 92| Type = (Int)
# 92| Type = Int
# 95| [ConcreteVarDecl] x
# 95| Type = Int
# 95| [ConcreteVarDecl] y
# 95| Type = Int
# 114| [ConcreteVarDecl] x
# 114| Type = (Int)
# 114| Type = Int
# 117| [ConcreteVarDecl] x
# 117| Type = Int
# 117| [ConcreteVarDecl] y
# 117| Type = Int
# 136| [ConcreteVarDecl] x
# 136| Type = (Int)
# 136| Type = Int
# 139| [ConcreteVarDecl] x
# 139| Type = Int
# 139| [ConcreteVarDecl] y
# 139| Type = Int
# 162| [ConcreteVarDecl] x
# 162| Type = (Int)
# 162| Type = Int
# 165| [ConcreteVarDecl] x
# 165| Type = Int
# 165| [ConcreteVarDecl] y

View File

@@ -1902,14 +1902,11 @@
| cfg.swift:464:39:464:39 | kpGet_mayB_x | cfg.swift:464:39:464:39 | (KeyPath<A, Int?>) ... | |
| cfg.swift:467:1:494:1 | enter testIfConfig() | cfg.swift:467:1:494:1 | testIfConfig() | |
| cfg.swift:467:1:494:1 | exit testIfConfig() (normal) | cfg.swift:467:1:494:1 | exit testIfConfig() | |
| cfg.swift:467:1:494:1 | testIfConfig() | cfg.swift:468:1:474:1 | #if ... | |
| cfg.swift:468:1:474:1 | #if ... | cfg.swift:472:3:472:3 | 3 | |
| cfg.swift:467:1:494:1 | testIfConfig() | cfg.swift:472:3:472:3 | 3 | |
| cfg.swift:472:3:472:3 | 3 | cfg.swift:473:3:473:3 | 4 | |
| cfg.swift:473:3:473:3 | 4 | cfg.swift:476:3:476:3 | 5 | |
| cfg.swift:476:3:476:3 | 5 | cfg.swift:478:1:481:1 | #if ... | |
| cfg.swift:478:1:481:1 | #if ... | cfg.swift:483:3:483:3 | 8 | |
| cfg.swift:483:3:483:3 | 8 | cfg.swift:485:1:491:1 | #if ... | |
| cfg.swift:485:1:491:1 | #if ... | cfg.swift:489:3:489:3 | 11 | |
| cfg.swift:476:3:476:3 | 5 | cfg.swift:483:3:483:3 | 8 | |
| cfg.swift:483:3:483:3 | 8 | cfg.swift:489:3:489:3 | 11 | |
| cfg.swift:489:3:489:3 | 11 | cfg.swift:490:3:490:3 | 12 | |
| cfg.swift:490:3:490:3 | 12 | cfg.swift:493:3:493:3 | 13 | |
| cfg.swift:493:3:493:3 | 13 | cfg.swift:467:1:494:1 | exit testIfConfig() (normal) | |

View File

@@ -1394,7 +1394,7 @@ class MacroRole(AstNode):
"""
kind: int | doc("kind of this macro role (declaration, expression, member, etc.)") | ql.internal
macro_syntax: int | doc("#freestanding or @attached") | ql.internal
conformances: list[TypeExpr] | doc("conformances of this macro role")
conformances: list[Expr] | doc("conformances of this macro role")
names: list[string] | doc("names of this macro role")
class MacroDecl(GenericContext, ValueDecl):

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.