================
@@ -2756,10 +2758,23 @@ 
CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF)
     : CGF(CGF) {
   assert(!CGF->IsSanitizerScope);
   CGF->IsSanitizerScope = true;
+
+  assert(!this->ApplyTrapDI);
+}
+
+CodeGenFunction::SanitizerScope::SanitizerScope(
+    CodeGenFunction *CGF, ArrayRef<SanitizerKind::SanitizerOrdinal> Ordinals,
+    SanitizerHandler Handler)
+    : SanitizerScope(CGF) {
+  this->ApplyTrapDI = new ApplyDebugLocation(
----------------
fmayer wrote:

Let's not do manual memory management. Use a `unique_ptr` and forward declared 
class, that should work because this class has a explicit destructor.

Also drop all the `this`

https://github.com/llvm/llvm-project/pull/141997
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to