[PATCH] D128535: [analyzer] Improve loads from reinterpret-cast fields

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 4 03:48:34 PDT 2022


martong added a comment.

I like it, but I'd like to know more about the nature of the applied "hack" and if there is a way to solve it properly in the longer term.



================
Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:2014-2017
+  // FIXME: This is a hack, and doesn't do anything really intelligent yet.
+  // FIXME: This hack is analogous with the one present in
+  // `getBindingForElement`, maybe we should handle both in
+  // `getBindingForFieldOrElementCommon`.
----------------
Could you please elaborate why this is a hack? What should be done and where to solve it properly? (Disclaimer, I did not look into `getBindingForFieldOrElementCommon`.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128535



More information about the cfe-commits mailing list