diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-05-09 10:03:08 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-05-09 10:03:08 +0000 |
| commit | e3e94bbf19477b2b3fcabe8cac6427c4c269c024 (patch) | |
| tree | c1a0c0eaa586d2cfcf963cb13a1d27efa267f99e /clang/lib | |
| parent | f2d589fe245562066ad409aefce87f015d9579e8 (diff) | |
| download | bcm5719-llvm-e3e94bbf19477b2b3fcabe8cac6427c4c269c024.tar.gz bcm5719-llvm-e3e94bbf19477b2b3fcabe8cac6427c4c269c024.zip | |
Remove the case for casting to compatible type in
RegionStoreManager::CastRegion(). This case should be subsumed by others.
llvm-svn: 71353
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Analysis/RegionStore.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index a23a47ecc88..4528ffbd2d7 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/lib/Analysis/RegionStore.cpp @@ -637,18 +637,10 @@ RegionStoreManager::CastRegion(const GRState* state, const MemRegion* R, return CastResult(state, R); } - // Assume we are casting from pointer to pointer. Other cases are handled - // elsewhere. + // Now assume we are casting from pointer to pointer. Other cases should + // already be handled. QualType PointeeTy = cast<PointerType>(ToTy.getTypePtr())->getPointeeType(); - // Return the same region if the region types are compatible. - if (const TypedRegion* TR = dyn_cast<TypedRegion>(R)) { - QualType Ta = Ctx.getCanonicalType(TR->getLocationType(Ctx)); - - if (Ta == ToTy) - return CastResult(state, R); - } - // Process region cast according to the kind of the region being cast. |

