File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -4595,6 +4595,15 @@ class CheckEffectsCoverage : public EffectsHandlingWalker<CheckEffectsCoverage>
4595
4595
if (!Ctx.LangOpts .hasFeature (Feature::StrictMemorySafety))
4596
4596
return ;
4597
4597
4598
+ // Silence this warning in the expansion of the _SwiftifyImport macro.
4599
+ // This is a hack because it's tricky to determine when to insert "unsafe".
4600
+ unsigned bufferID =
4601
+ Ctx.SourceMgr .findBufferContainingLoc (E->getUnsafeLoc ());
4602
+ if (auto sourceInfo = Ctx.SourceMgr .getGeneratedSourceInfo (bufferID)) {
4603
+ if (sourceInfo->macroName == " _SwiftifyImport" )
4604
+ return ;
4605
+ }
4606
+
4598
4607
if (auto *SVE = SingleValueStmtExpr::tryDigOutSingleValueStmtExpr (E)) {
4599
4608
// For an if/switch expression, produce a tailored warning.
4600
4609
Ctx.Diags .diagnose (E->getUnsafeLoc (),
You can’t perform that action at this time.
0 commit comments