From 5f95cb2734ccee5e7b04f8b2cd4649209b432454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Sat, 31 Dec 2016 20:56:49 -0400 Subject: [PATCH] I: Enforcement fixes/completion --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 8df991e..53afef3 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -1664,7 +1664,7 @@ so the default is "no ownership transfer." * (Simple) Warn on `delete` of a raw pointer that is not an `owner`. * (Simple) Warn on failure to either `reset` or explicitly `delete` an `owner` pointer on every code path. -* (Simple) Warn if the return value of `new` or a function call with return value of pointer type is assigned to a raw pointer. +* (Simple) Warn if the return value of `new` or a function call with an `owner` return value is assigned to a raw pointer or non-`owner` reference. ### I.12: Declare a pointer that must not be null as `not_null` @@ -1927,7 +1927,7 @@ This will force every derived class to compute a center -- even if that's non-tr ##### Enforcement -(Simple) Warn if a pointer to a class `C` is assigned to a pointer to a base of `C` and the base class contains data members. +(Simple) Warn if a pointer/reference to a class `C` is assigned to a pointer/reference to a base of `C` and the base class contains data members. ### I.26: If you want a cross-compiler ABI, use a C-style subset