[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants
Rafael Stahl via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 18 08:45:32 PDT 2018
r.stahl created this revision.
r.stahl added reviewers: NoQ, dcoughlin, xazax.hun.
Herald added subscribers: cfe-commits, a.sidorin, rnkovacs, szepet, mehdi_amini.
Herald added a reviewer: george.karpenkov.
- SValBuilder::getConstantVal stopped processing an initialization if there are intermediate casts. Now additionally handles CStyleCastExpr, CXXConstCastExpr, CXXReinterpretCastExpr, CXXStaticCastExpr, CXXFunctionalCastExpr. Additional CastKinds are CK_NoOp and CK_IntegralToPointer - the others are already handled by EvaluateAsInt.
- RegionStoreManager::getBindingForElement now resolves a constant array initialization.
- RegionStoreManager::getBindingForField now resolves constant in-class initializers and constant element-wise initialization.
- Added tests for all new cases.
Repository:
rC Clang
https://reviews.llvm.org/D45774
Files:
lib/StaticAnalyzer/Core/RegionStore.cpp
lib/StaticAnalyzer/Core/SValBuilder.cpp
test/Analysis/globals.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45774.142945.patch
Type: text/x-patch
Size: 6726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180418/5f7d4449/attachment.bin>
More information about the cfe-commits
mailing list