NoQ added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Checkers/CheckPlacementNew.cpp:189
+  if (const MemRegion *MRegion = PlaceVal.getAsRegion()) {
+    if (const ElementRegion *TheElementRegion =
+            MRegion->getAs<ElementRegion>()) {
----------------
The sequence of `FieldRegion`s and `ElementRegion`s on top of a base region may 
be arbitrary: `var.a[0].b[1][2].c.d[3]` etc.

I'd rather unwrap those regions one-by-one in a loop and look at the alignment 
of each layer.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76996/new/

https://reviews.llvm.org/D76996



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to