[PATCH] D144304: [-Wunsafe-buffer-usage] Add a Fixable for pointer pre-increment

Ziqing Luo via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 4 15:56:21 PDT 2023


ziqingluo-90 marked an inline comment as done.
ziqingluo-90 added inline comments.


================
Comment at: clang/test/SemaCXX/warn-unsafe-buffer-usage-fixits-addressof-arraysubscript.cpp:19
   bool a = (bool) &p[5];
-  // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:19-[[@LINE-1]]:24}:"(p.data() + 5)"
+  // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:19-[[@LINE-1]]:24}:"&p.data()[5]"
   bool b = (bool) &p[x];
----------------
NoQ wrote:
> These changes look unrelated, probably accidentally included from another patch 🤔
oh yes,  need a rebase.


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

https://reviews.llvm.org/D144304



More information about the cfe-commits mailing list