@@ -888,25 +888,11 @@ BoundsKey AVarBoundsInfo::getRandomBKey() {
888888  return  Ret;
889889}
890890
891- bool  AVarBoundsInfo::addAssignment (clang::Decl *L, clang::Decl *R) {
892-   BoundsKey BL, BR;
893-   if  (tryGetVariable (L, BL) && tryGetVariable (R, BR)) {
894-     return  addAssignment (BL, BR);
895-   }
896-   return  false ;
897- }
898- 
899- bool  AVarBoundsInfo::addAssignment (clang::DeclRefExpr *L,
900-                                    clang::DeclRefExpr *R) {
901-   return  addAssignment (L->getDecl (), R->getDecl ());
902- }
903- 
904- bool  AVarBoundsInfo::handleAssignment (clang::Expr *L, const  CVarSet &LCVars,
891+ void  AVarBoundsInfo::handleAssignment (clang::Expr *L, const  CVarSet &LCVars,
905892                                      const  std::set<BoundsKey> &CSLKeys,
906893                                      clang::Expr *R, const  CVarSet &RCVars,
907894                                      const  std::set<BoundsKey> &CSRKeys,
908895                                      ASTContext *C, ConstraintResolver *CR) {
909-   bool  Ret = false ;
910896  BoundsKey TmpK;
911897  std::set<BoundsKey> AllLKeys = CSLKeys;
912898  std::set<BoundsKey> AllRKeys = CSRKeys;
@@ -921,32 +907,29 @@ bool AVarBoundsInfo::handleAssignment(clang::Expr *L, const CVarSet &LCVars,
921907
922908  for  (auto  LK : AllLKeys) {
923909    for  (auto  RK : AllRKeys) {
924-       Ret =  addAssignment (LK, RK) || Ret ;
910+       addAssignment (LK, RK);
925911    }
926912  }
927-   return  Ret;
928913}
929914
930- bool  AVarBoundsInfo::handleAssignment (clang::Decl *L, CVarOption LCVars,
915+ void  AVarBoundsInfo::handleAssignment (clang::Decl *L, CVarOption LCVars,
931916                                      clang::Expr *R, const  CVarSet &RCVars,
932917                                      const  std::set<BoundsKey> &CSRKeys,
933918                                      ASTContext *C, ConstraintResolver *CR) {
934919  BoundsKey LKey, RKey;
935-   bool  Ret = false ;
936920  if  (CR->resolveBoundsKey (LCVars, LKey) || tryGetVariable (L, LKey)) {
937921    std::set<BoundsKey> AllRKeys = CSRKeys;
938922    if  (AllRKeys.empty () &&
939923        (CR->resolveBoundsKey (RCVars, RKey) || tryGetVariable (R, *C, RKey))) {
940924      AllRKeys.insert (RKey);
941925    }
942926    for  (auto  RK : AllRKeys) {
943-       Ret =  addAssignment (LKey, RK) || Ret ;
927+       addAssignment (LKey, RK);
944928    }
945929  }
946-   return  Ret;
947930}
948931
949- bool  AVarBoundsInfo::addAssignment (BoundsKey L, BoundsKey R) {
932+ void  AVarBoundsInfo::addAssignment (BoundsKey L, BoundsKey R) {
950933  //  Before adding an edge from L to R or R to L, first verify that the source
951934  //  BoundsKey for the edge is not computed by pointer arithmetic. The pointer
952935  //  arithmetic invalidates the bounds on the pointer, so bounds should not
@@ -975,15 +958,12 @@ bool AVarBoundsInfo::addAssignment(BoundsKey L, BoundsKey R) {
975958    if  (!(PV && PV->isNumConstant ()))
976959      AddEdgeUnlessPointerArithmetic (L, R);
977960  }
978-   return  true ;
979961}
980962
981- bool  AVarBoundsInfo::handlePointerAssignment (clang::Expr *L, clang::Expr *R,
982-                                              ASTContext *C,
963+ void  AVarBoundsInfo::handlePointerAssignment (clang::Expr *L, clang::Expr *R,
983964                                             ConstraintResolver *CR) {
984965  if  (isAssignmentPointerArithmetic (L ,R))
985966    recordArithmeticOperation (L, CR);
986-   return  true ;
987967}
988968
989969void  AVarBoundsInfo::mergeBoundsKey (BoundsKey To, BoundsKey From) {
0 commit comments