================
@@ -766,18 +766,13 @@ void CodeGenFunction::EmitTypeCheck(TypeCheckKind TCK, 
SourceLocation Loc,
   llvm::BasicBlock *Done = nullptr;
   bool DoneViaNullSanitize = false;
 
+  llvm::Value *True = llvm::ConstantInt::getTrue(getLLVMContext());
+
   {
-    auto CheckHandler = SanitizerHandler::TypeMismatch;
-    SanitizerDebugLocation SanScope(this,
-                                    {SanitizerKind::SO_Null,
-                                     SanitizerKind::SO_ObjectSize,
-                                     SanitizerKind::SO_Alignment},
+    auto CheckHandler = SanitizerHandler::NullPointerUse;
+    SanitizerDebugLocation SanScope(this, {SanitizerKind::SO_Null},
----------------
thurstond wrote:

Nit: assign the SanitizerKind to a variable, so that it can be reused between 
the SanScope and EmitCheck.
(Prior to this change, that wasn't possible because the SanScope had multiple 
SanitizerKinds but the EmitCheck only had one.)

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

Reply via email to