[clang] [LifetimeSafety] Add suggestion and inference for implicit this (PR #176703)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 23 08:56:45 PST 2026
================
@@ -56,10 +56,19 @@ class LifetimeSafetyReporter {
SourceLocation ExpiryLoc,
----------------
usx95 wrote:
This is no more only a reporter.
While you are at it, could you please rename this to `LifetimeSafetySemaHelper` and add some documentation for why this class exists.
```cpp
/// Abstract interface for operations requiring Sema access.
///
/// This class exists to break a circular dependency: the LifetimeSafety analysis
/// target cannot directly depend on clangSema (which would create the cycle:
/// clangSema -> clangAnalysis -> clangAnalysisLifetimeSafety -> clangSema).
///
/// Instead, this interface is implemented in AnalysisBasedWarnings.cpp (part of
/// clangSema), allowing the analysis to report diagnostics and modify the AST
/// through Sema without introducing a circular dependency.
class LifetimeSafetySemaHelper {
```
https://github.com/llvm/llvm-project/pull/176703
More information about the cfe-commits
mailing list