]> granicus.if.org Git - clang/commit
[analyzer] CastValueChecker: Correctly model results of based-to-derived casts.
authorArtem Dergachev <artem.dergachev@gmail.com>
Fri, 23 Aug 2019 03:24:04 +0000 (03:24 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Fri, 23 Aug 2019 03:24:04 +0000 (03:24 +0000)
commit472c755e9d89617dd845445fdd34cb49700b3b20
treeb73a51c7fd06cb15652665d11c00e386f7f74ff1
parent65d0c48d81b73c359f40f6c068bd89a8b91229ac
[analyzer] CastValueChecker: Correctly model results of based-to-derived casts.

Our SVal hierarchy doesn't allow modeling pointer casts as no-op. The
pointer type is instead encoded into the pointer object. Defer to our
usual pointer casting facility, SValBuilder::evalBinOp().

Fixes a crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369729 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/CastValueChecker.cpp
test/Analysis/cast-value-logic.cpp
test/Analysis/cast-value-notes.cpp