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 @@ -4599,6 +4599,15 @@ class CheckEffectsCoverage : public EffectsHandlingWalker<CheckEffectsCoverage>
4599
4599
if (!Ctx.LangOpts .hasFeature (Feature::StrictMemorySafety))
4600
4600
return ;
4601
4601
4602
+ // Silence this warning in the expansion of the _SwiftifyImport macro.
4603
+ // This is a hack because it's tricky to determine when to insert "unsafe".
4604
+ unsigned bufferID =
4605
+ Ctx.SourceMgr .findBufferContainingLoc (E->getUnsafeLoc ());
4606
+ if (auto sourceInfo = Ctx.SourceMgr .getGeneratedSourceInfo (bufferID)) {
4607
+ if (sourceInfo->macroName == " _SwiftifyImport" )
4608
+ return ;
4609
+ }
4610
+
4602
4611
if (auto *SVE = SingleValueStmtExpr::tryDigOutSingleValueStmtExpr (E)) {
4603
4612
// For an if/switch expression, produce a tailored warning.
4604
4613
Ctx.Diags .diagnose (E->getUnsafeLoc (),
You can’t perform that action at this time.
0 commit comments