ASDenysPetrov added a comment.
@steakhal
Thank you for your comments.
Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1663
// We can trust a const value or a value of a global initializer in main().
-const VarDecl *VD = VR->getDecl();
+const VarDecl *VD
steakhal added inline comments.
Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1663
// We can trust a const value or a value of a global initializer in main().
-const VarDecl *VD = VR->getDecl();
+const VarDecl *VD = VR->getDecl()->getMostRecentDecl();
ASDenysPetrov added a comment.
@NoQ @martong
Guys, I've patched the bug. Could you check it? It works, but I have doubts
using `VR->getDecl()->getMostRecentDecl();` as a correct way to get a right
declaration.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.
ASDenysPetrov created this revision.
ASDenysPetrov added reviewers: NoQ, martong.
Herald added subscribers: steakhal, manas, dkrupp, donat.nagy, Szelethus,
mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.
ASDenysPetrov requested review of this revision.
Herald added a p