[clang] [LifetimeSafety] Support C Language in LifetimeSafety (PR #203270)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 12 08:02:29 PDT 2026


================
@@ -3164,7 +3164,8 @@ void clang::sema::AnalysisBasedWarnings::IssueWarnings(
 
   // TODO: Enable lifetime safety analysis for other languages once it is
   // stable.
-  if (EnableLifetimeSafetyAnalysis && S.getLangOpts().CPlusPlus) {
+  if (EnableLifetimeSafetyAnalysis &&
+      (S.getLangOpts().CPlusPlus || !S.getLangOpts().ObjC)) {
----------------
NeKon69 wrote:

Please see how I refactored and whether if it's OK.

https://github.com/llvm/llvm-project/pull/203270


More information about the cfe-commits mailing list