martong added a comment.

Good catch Artem, thanks for the report!

Maybe a single line change could solve this?

  const VarDecl *VD = VR->getDecl()->getCanonicalDecl();



================
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();
     if (VD->getType().isConstQualified() ||
----------------
const VarDecl *VD = VR->getDecl()->getCanonicalDecl();


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104285

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to