@@ -335,7 +335,7 @@ SILInstruction *AnalysisInfo::findNonisolatedBlame(SILInstruction* startInst) {
335
335
llvm_unreachable (" failed to find nonisolated blame." );
336
336
}
337
337
338
- ValueDecl *findCallee (ApplySite &apply) {
338
+ static ValueDecl *findCallee (ApplySite &apply) {
339
339
SILValue callee = apply.getCalleeOrigin ();
340
340
341
341
auto check = [](ValueDecl *decl) -> ValueDecl* {
@@ -359,7 +359,7 @@ ValueDecl *findCallee(ApplySite &apply) {
359
359
return nullptr ;
360
360
}
361
361
362
- StringRef verbForInvoking (ValueDecl *value) {
362
+ static StringRef verbForInvoking (ValueDecl *value) {
363
363
// Only computed properties need a different verb.
364
364
if (isa<AbstractStorageDecl>(value))
365
365
return " accessing " ;
@@ -371,7 +371,7 @@ StringRef verbForInvoking(ValueDecl *value) {
371
371
// / introducing non-isolation, this function produces the values needed
372
372
// / to describe it to the user. Thus, the implementation of this function is
373
373
// / closely tied to that diagnostic.
374
- std::tuple<StringRef, StringRef, DeclName>
374
+ static std::tuple<StringRef, StringRef, DeclName>
375
375
describe (SILInstruction *blame) {
376
376
auto &ctx = blame->getModule ().getASTContext ();
377
377
@@ -385,21 +385,21 @@ describe(SILInstruction *blame) {
385
385
386
386
// if we have no callee info, all we know is it's a call involving self.
387
387
if (!callee)
388
- return { " a call involving" , " " , ctx.Id_self } ;
388
+ return std::make_tuple ( " a call involving" , " " , ctx.Id_self ) ;
389
389
390
- return {
390
+ return std::make_tuple (
391
391
verbForInvoking (callee),
392
392
callee->getDescriptiveKindName (callee->getDescriptiveKind ()),
393
393
callee->getName ()
394
- } ;
394
+ ) ;
395
395
}
396
396
397
397
// handle non-call blames
398
398
switch (blame->getKind ()) {
399
399
case SILInstructionKind::CopyValueInst:
400
- return { " making a copy of" , " " , ctx.Id_self } ;
400
+ return std::make_tuple ( " making a copy of" , " " , ctx.Id_self ) ;
401
401
default :
402
- return { " this use of" , " " , ctx.Id_self } ;
402
+ return std::make_tuple ( " this use of" , " " , ctx.Id_self ) ;
403
403
}
404
404
}
405
405
0 commit comments