[clang] [analyzer] Simplify SVal for simple NonLoc->Loc casts (PR #66463)
Ding Fei via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 15 03:41:59 PDT 2023
================
@@ -264,7 +264,8 @@ ProgramStateRef ExprEngine::handleLValueBitCast(
}
// Delegate to SValBuilder to process.
SVal OrigV = state->getSVal(Ex, LCtx);
- SVal V = svalBuilder.evalCast(OrigV, T, ExTy);
+ SVal SimplifiedOrigV = svalBuilder.simplifySVal(state, OrigV);
+ SVal V = svalBuilder.evalCast(SimplifiedOrigV, T, ExTy);
----------------
danix800 wrote:
Bound value might not be used at all, so I think lazy simplification would be better.
https://github.com/llvm/llvm-project/pull/66463
More information about the cfe-commits
mailing list