r175677 - Use op-> directly rather than via Optional<T>::getPointer.

David Blaikie dblaikie at gmail.com
Wed Feb 20 14:23:01 PST 2013


Author: dblaikie
Date: Wed Feb 20 16:23:01 2013
New Revision: 175677

URL: http://llvm.org/viewvc/llvm-project?rev=175677&view=rev
Log:
Use op-> directly rather than via Optional<T>::getPointer.

Post-commit CR feedback from Jordan Rose regarding r175594.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp?rev=175677&r1=175676&r2=175677&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/RegionStore.cpp Wed Feb 20 16:23:01 2013
@@ -1265,7 +1265,7 @@ RegionStoreManager::getLazyBinding(Regio
   if (originalRegion != R) {
     if (Optional<SVal> OV = B.getDefaultBinding(R)) {
       if (llvm::Optional<nonloc::LazyCompoundVal> V =
-              OV.getPointer()->getAs<nonloc::LazyCompoundVal>())
+              OV->getAs<nonloc::LazyCompoundVal>())
         return std::make_pair(V->getStore(), V->getRegion());
     }
   }
@@ -1671,7 +1671,7 @@ NonLoc RegionStoreManager::createLazyBin
   // don't create a new lazy binding.
   if (Optional<SVal> V = B.getDefaultBinding(R)) {
     if (llvm::Optional<nonloc::LazyCompoundVal> LCV =
-            V.getPointer()->getAs<nonloc::LazyCompoundVal>()) {
+            V->getAs<nonloc::LazyCompoundVal>()) {
       QualType RegionTy = R->getValueType();
       QualType SourceRegionTy = LCV->getRegion()->getValueType();
       if (Ctx.hasSameUnqualifiedType(RegionTy, SourceRegionTy))





More information about the cfe-commits mailing list