3056439bb175db8c46b89fb4385de8b3a8e42d0d |
|
29-May-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Re-enable reasoning about CK_LValueBitCast It’s important for us to reason about the cast as it is used in std::addressof. The reason we did not handle the cast previously was a crash on a test case (see commit r157478). The crash was in processing array to pointer decay when the region type was not an array. Address the issue, by just returning an unknown in that case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/reinterpret-cast.cpp
|
6dc5c33fd4334ccf4a661c331f86e23829e51d55 |
|
25-Feb-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Base regions may be invalid when layered on symbolic regions. While RegionStore checks to make sure casts on TypedValueRegions are valid, it does not do the same for SymbolicRegions, which do not have perfect type info anyway. Additionally, MemRegion::getAsOffset does not take a ProgramState, so it can't use dynamic type info to determine a better type for the regions. (This could also be dangerous if the type of a super-region changes!) Account for this by checking that a base object region is valid on top of a symbolic region, and falling back to "symbolic offset" mode if not. Fixes PR15345. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/reinterpret-cast.cpp
|
0cd3142cc55f69acae1568ed9ba80470c6fabe61 |
|
21-Feb-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Add another reinterpret_cast behavior test. The test is similar to <rdar://problem/13239840> but doesn't actually test the case that fails there. It's still a good test, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/reinterpret-cast.cpp
|
ada0d224fcff5ff07c9dd846379592f92ccf5ee7 |
|
15-Feb-2013 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Don't assert when mixing reinterpret_cast and derived-to-base casts. This just adds a very simple check that if a DerivedToBase CastExpr is operating on a value with known C++ object type, and that type is not the base type specified in the AST, then the cast is invalid and we should return UnknownVal. In the future, perhaps we can have a checker that specifies that this is illegal, but we still shouldn't assert even if the user turns that checker off. PR14872 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/reinterpret-cast.cpp
|
bfa9ab8183e2fdc74f8633d758cb0c6201314320 |
|
25-Jan-2013 |
Anna Zaks <ganna@apple.com> |
[analyzer] Replace "-analyzer-ipa" with "-analyzer-config ipa". The idea is to eventually place all analyzer options under "analyzer-config". In addition, this lays the ground for introduction of a high-level analyzer mode option, which will influence the default setting for IPAMode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/reinterpret-cast.cpp
|
9f6441ad92c30028032eb3df6f4a7f2ebe393a68 |
|
15-Aug-2012 |
Jordan Rose <jordan_rose@apple.com> |
[analyzer] Only adjust the type of 'this' when we devirtualize a method call. With reinterpret_cast, we can get completely unrelated types in a region hierarchy together; this was resulting in CXXBaseObjectRegions being layered directly on an (untyped) SymbolicRegion, whose symbol was from a completely different type hierarchy. This was what was causing the internal buildbot to fail. Reverts r161911, which merely masked the problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/reinterpret-cast.cpp
|