================ Comment at: tools/clang/lib/CodeGen/CGExprScalar.cpp:839 @@ -837,2 +838,3 @@ void ScalarExprEmitter::EmitBinOpCheck(Value *Check, const BinOpInfo &Info) { + assert(CGF.IsSanitizerScope); StringRef CheckName; ---------------- Several callers of this are only guarding their call to this function; how about sinking the `SanitizerScope` down into here (and teaching the scope to cope with multiple `SanitizerScope` objects being live at once)?
================ Comment at: tools/clang/lib/CodeGen/CodeGenFunction.cpp:1660 @@ +1659,3 @@ + I->setMetadata( + CGM.getModule().getMDKindID("ubsan"), + llvm::MDNode::get(CGM.getLLVMContext(), ArrayRef<llvm::Value *>())); ---------------- It seems more future-safe to pick a more general name for this, describing its functionality not this particular use case. Maybe `"nosanitize"`? http://reviews.llvm.org/D4544 _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits