================
@@ -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)) {
----------------
usx95 wrote:
We should also do this for end of TU analysis.
```cpp
if (S.getLangOpts().CPlusPlus &&
S.getLangOpts().EnableLifetimeSafetyTUAnalysis)
LifetimeSafetyTUAnalysis(S, TU, LSStats);
```
Maybe refactor to do this directly in `lifetimes::IsLifetimeSafetyEnabled` as
it already has the `Sema` and make TU analysis use that method as well.
https://github.com/llvm/llvm-project/pull/203270
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits