[PATCH] D49589: [UBSan] Strengthen pointer checks in 'new' expressions

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 26 12:38:48 PDT 2018


rjmccall added inline comments.


================
Comment at: lib/CodeGen/CGClass.cpp:2190
                          This, Args, AggValueSlot::MayOverlap,
-                         E->getLocation());
+                         E->getLocation(), true);
 }
----------------
Please include `/* */` comments to describe what `true` and `false` mean as arguments throughout this patch, just like the `/*Delegating*/` comment here.


================
Comment at: lib/CodeGen/CGValue.h:487
+  /// them.
+  bool CheckedFlag : 1;
+
----------------
Are those checks anything more than pointer alignment?  If so, please call this
(and all the methods for it) `SanitizerCheckedFlag`; otherwise, please just call it
`AlignmentCheckedFlag`.


Repository:
  rC Clang

https://reviews.llvm.org/D49589





More information about the cfe-commits mailing list