mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 13:35:38 +08:00
We have got customer reporting "v &obj" and "p &obj" reporting different results. Turns out it only happens for obj that is itself a reference type which "v &obj" reports the address of the reference itself instead of the target object the reference points to. This diverged from C++ semantics. This PR fixes this issue by returning the address of the dereferenced object if it is reference type. A new test is added which fails before. Co-authored-by: jeffreytan81 <jeffreytan@fb.com>