]> granicus.if.org Git - clang/commit
[analyzer] Don't try to evaluate MaterializeTemporaryExpr as a constant.
authorJordan Rose <jordan_rose@apple.com>
Thu, 2 May 2013 19:51:20 +0000 (19:51 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 2 May 2013 19:51:20 +0000 (19:51 +0000)
commit4b75085f5669efc6407c662b5686361624c3ff2f
tree959f9cebb4a939a426b72fd52f2aa66605c048fc
parent4e3b54b4acb4dd926ca50d7f06c8265d1d24ba79
[analyzer] Don't try to evaluate MaterializeTemporaryExpr as a constant.

...and don't consider '0' to be a null pointer constant if it's the
initializer for a float!

Apparently null pointer constant evaluation looks through both
MaterializeTemporaryExpr and ImplicitCastExpr, so we have to be more
careful about types in the callers. For RegionStore this just means giving
up a little more; for ExprEngine this means handling the
MaterializeTemporaryExpr case explicitly.

Follow-up to r180894.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180944 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
lib/StaticAnalyzer/Core/ExprEngine.cpp
lib/StaticAnalyzer/Core/SValBuilder.cpp
test/Analysis/inline.cpp