[clang] [LifetimeSafety] Support C Language in LifetimeSafety (PR #203270)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 12 08:23:47 PDT 2026
================
@@ -2999,8 +2999,7 @@ void clang::sema::AnalysisBasedWarnings::IssueWarnings(
}
}
- if (S.getLangOpts().CPlusPlus &&
- S.getLangOpts().EnableLifetimeSafetyTUAnalysis)
+ if (S.getLangOpts().EnableLifetimeSafetyTUAnalysis && !S.getLangOpts().ObjC)
----------------
usx95 wrote:
Can we use `IsLifetimeSafetyEnabled` here and make it return true for TUdecl instead of checking if diags are enabled.
https://github.com/llvm/llvm-project/pull/203270
More information about the cfe-commits
mailing list