[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)
Kristóf Umann via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 22 02:11:16 PDT 2024
================
@@ -363,6 +397,18 @@ class LazyCompoundVal : public NonLoc {
/// It might return null.
const void *getStore() const;
+ /// This function itself is immaterial. It is only an implementation detail.
+ /// LazyCompoundVal represents only the rvalue, the data (known or unknown)
+ /// that *was* stored in that region *at some point in the past*. The region
+ /// should not be used for any purpose other than figuring out what part of
+ /// the frozen Store you're interested in. The value does not represent the
+ /// *current* value of that region. Sometimes it may, but this should not be
+ /// relied upon. Instead, if you want to figure out what region it represents,
+ /// you typically need to see where you got it from in the first place. The
+ /// region is absolutely not analogous to the C++ "this" pointer. It is also
+ /// not a valid way to "materialize" the prvalue into a glvalue in C++,
+ /// because the region represents the *old* storage (sometimes very old), not
+ /// the *future* storage.
----------------
Szelethus wrote:
@haoNoQ I can't really counter this, can you help us out a bit? :)
https://github.com/llvm/llvm-project/pull/97407
More information about the cfe-commits
mailing list