================
@@ -1255,15 +1255,23 @@ class Analyzer {
     }
 
     bool VisitCXXDeleteExpr(CXXDeleteExpr *Delete) override {
+      FunctionDecl *OpDelete = Delete->getOperatorDelete();
+
+      // RecursiveASTVisitor does not visit the called destructor.
+      // But a destroying operator delete means that no destructor is called.
+      if (OpDelete == nullptr || !OpDelete->isDestroyingOperatorDelete()) {
----------------
Sirraide wrote:

Oh right; I was only looking at the body of the `if` statement and was like 
‘we’re not using `OpDelete`, so why do we care whether it’s null’, but yes, 
you’re right, the condition uses it so we should keep that check

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

Reply via email to