Remove some uses of TypedViewRegion, and use getBaseRegion() in a context where
we don't care about ElementRegions layered on top of a base region. llvm-svn: 77484
This commit is contained in:
		
							parent
							
								
									bca70671e7
								
							
						
					
					
						commit
						87a7a451ad
					
				| 
						 | 
					@ -394,14 +394,11 @@ bool AuditCFNumberCreate::Audit(ExplodedNode<GRState>* N,GRStateManager&){
 | 
				
			||||||
  if (!LV)
 | 
					  if (!LV)
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  const TypedRegion* R = dyn_cast<TypedRegion>(LV->getRegion());
 | 
					  const TypedRegion* R = dyn_cast<TypedRegion>(LV->getBaseRegion());
 | 
				
			||||||
  if (!R) return false;
 | 
					
 | 
				
			||||||
  
 | 
					  if (!R)
 | 
				
			||||||
  while (const TypedViewRegion* ATR = dyn_cast<TypedViewRegion>(R)) {
 | 
					    return false;
 | 
				
			||||||
    R = dyn_cast<TypedRegion>(ATR->getSuperRegion());
 | 
					
 | 
				
			||||||
    if (!R) return false;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  QualType T = Ctx.getCanonicalType(R->getValueType(Ctx));
 | 
					  QualType T = Ctx.getCanonicalType(R->getValueType(Ctx));
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  // FIXME: If the pointee isn't an integer type, should we flag a warning?
 | 
					  // FIXME: If the pointee isn't an integer type, should we flag a warning?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3023,7 +3023,7 @@ void CFRefCount::EvalObjCMessageExpr(ExplodedNodeSet<GRState>& Dst,
 | 
				
			||||||
      if (Expr* Receiver = ME->getReceiver()) {
 | 
					      if (Expr* Receiver = ME->getReceiver()) {
 | 
				
			||||||
        SVal X = St->getSValAsScalarOrLoc(Receiver);
 | 
					        SVal X = St->getSValAsScalarOrLoc(Receiver);
 | 
				
			||||||
        if (loc::MemRegionVal* L = dyn_cast<loc::MemRegionVal>(&X))
 | 
					        if (loc::MemRegionVal* L = dyn_cast<loc::MemRegionVal>(&X))
 | 
				
			||||||
          if (L->getRegion() == St->getSelfRegion()) {
 | 
					          if (L->getBaseRegion() == St->getSelfRegion()) {
 | 
				
			||||||
            // Update the summary to make the default argument effect
 | 
					            // Update the summary to make the default argument effect
 | 
				
			||||||
            // 'StopTracking'.
 | 
					            // 'StopTracking'.
 | 
				
			||||||
            Summ = Summaries.copySummary(Summ);
 | 
					            Summ = Summaries.copySummary(Summ);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue