[PATCH] D111542: [analyzer] Retrieve VLA extent from its redeclaration.

2021-10-11 Thread Denys Petrov via Phabricator via cfe-commits
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

[PATCH] D111542: [analyzer] Retrieve VLA extent from its redeclaration.

2021-10-11 Thread Balázs Benics via Phabricator via cfe-commits
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();

[PATCH] D111542: [analyzer] Retrieve VLA extent from its redeclaration.

2021-10-11 Thread Denys Petrov via Phabricator via cfe-commits
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.

[PATCH] D111542: [analyzer] Retrieve VLA extent from its redeclaration.

2021-10-11 Thread Denys Petrov via Phabricator via cfe-commits
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