================
@@ -2919,6 +2919,30 @@ class LifetimeSafetyReporterImpl : public 
LifetimeSafetyReporter {
         << EscapeExpr->getSourceRange();
   }
 
+  void suggestAnnotation(SuggestionScope Scope, const CXXMethodDecl *MD,
+                         const Expr *EscapeExpr) override {
+    unsigned DiagID = (Scope == SuggestionScope::CrossTU)
+                          ? diag::warn_lifetime_safety_this_cross_tu_suggestion
+                          : 
diag::warn_lifetime_safety_this_intra_tu_suggestion;
+
+    SourceLocation InsertionPoint;
+    if (auto *TSI = MD->getTypeSourceInfo())
+      InsertionPoint =
+          Lexer::getLocForEndOfToken(TSI->getTypeLoc().getEndLoc(), 0,
+                                     S.getSourceManager(), S.getLangOpts());
+    else
+      InsertionPoint = MD->getLocation();
----------------
kashika0112 wrote:

This is no longer required, I have removed this.

https://github.com/llvm/llvm-project/pull/176703
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to