[PATCH] D143128: [-Wunsafe-buffer-usage] Fix-Its transforming `&DRE[any]` to `(DRE.data() + any)`

Malavika Samak via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 24 17:20:27 PDT 2023


malavikasamak added inline comments.


================
Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:1096
+      } else {
+        SS << "&" << getExprText(DRE, SM, LangOpts).str() << ".data()"
+           << "[" << getExprText(Idx, SM, LangOpts).str() << "]";
----------------
The title and summary of this patch indicates this gadget emits fixit of the form  &DRE.data() + any when it encounters &DRE[any], but the code seems to emits &DRE.data()[any] instead? If yes, can you please update the summary?


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

https://reviews.llvm.org/D143128



More information about the cfe-commits mailing list