[all-commits] [llvm/llvm-project] 7736b0: [analyzer] Replace StoreManager::CastRetrievedVal ...
Denys Petrov via All-commits
all-commits at lists.llvm.org
Tue Apr 13 08:10:29 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7736b08c287274361f2cdf13512015708af4d335
https://github.com/llvm/llvm-project/commit/7736b08c287274361f2cdf13512015708af4d335
Author: Denys Petrov <dpetrov at accesssoftek.com>
Date: 2021-04-13 (Tue, 13 Apr 2021)
Changed paths:
M clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
M clang/lib/StaticAnalyzer/Core/RegionStore.cpp
M clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
M clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
M clang/lib/StaticAnalyzer/Core/Store.cpp
Log Message:
-----------
[analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast
Summary: Move logic from CastRetrievedVal to evalCast and replace CastRetrievedVal with evalCast. Also move guts from SimpleSValBuilder::dispatchCast inside evalCast.
evalCast intends to substitute dispatchCast, evalCastFromNonLoc and evalCastFromLoc in the future. OriginalTy provides additional information for casting, which is useful for some cases and useless for others. If `OriginalTy.isNull()` is true, then cast performs based on CastTy only. Now evalCast operates in two ways. It retains all previous behavior and take over dispatchCast behavior. dispatchCast, evalCastFromNonLoc and evalCastFromLoc is considered as buggy since it doesn't take into account OriginalTy of the SVal and should be improved.
>From this patch use evalCast instead of dispatchCast, evalCastFromNonLoc and evalCastFromLoc functions. dispatchCast redirects to evalCast.
This patch shall not change any behavior.
Differential Revision: https://reviews.llvm.org/D96090
More information about the All-commits
mailing list