[analyzer] Tweak LazyCompoundVal reuse check to ignore qualifiers.
authorJordan Rose <jordan_rose@apple.com>
Fri, 15 Feb 2013 00:32:08 +0000 (00:32 +0000)
committerJordan Rose <jordan_rose@apple.com>
Fri, 15 Feb 2013 00:32:08 +0000 (00:32 +0000)
This is optimization only; no behavioral change.

llvm-svn: 175231

clang/lib/StaticAnalyzer/Core/RegionStore.cpp

index 76abf23..8119966 100644 (file)
@@ -1605,7 +1605,7 @@ NonLoc RegionStoreManager::createLazyBinding(RegionBindingsConstRef B,
     if (LCV) {
       QualType RegionTy = R->getValueType();
       QualType SourceRegionTy = LCV->getRegion()->getValueType();
-      if (RegionTy.getCanonicalType() == SourceRegionTy.getCanonicalType())
+      if (Ctx.hasSameUnqualifiedType(RegionTy, SourceRegionTy))
         return *LCV;
     }
   }