[cfe-commits] [PATCH] Rename

Ted Kremenek kremenek at apple.com
Thu Oct 16 22:22:05 PDT 2008


On Oct 16, 2008, at 10:15 PM, Zhongxing Xu wrote:

> This is the renaming patch:
>
> RVal => ExprVal
> LVal => Loc
> NonLVal => NonLoc
> lval => loc
> nonlval => nonloc
> <rename.patch>_______________________________________________

The patch looks great, but I'm a little hesitant about the name  
"ExprVal."  For example, this patch shows "ExprVals" being used with  
the Store:

+Store BasicStoreManager::SetExprVal(Store store, Loc LV, ExprVal V) {
    switch (LV.getSubKind()) {
-    case lval::MemRegionKind: {
+    case loc::MemRegionKind: {
        VarRegion* R =
-        dyn_cast<VarRegion>(cast<lval::MemRegionVal>(LV).getRegion());
+        dyn_cast<VarRegion>(cast<loc::MemRegionVal>(LV).getRegion());

        if (!R)
          return store;
@@ -157,16 +157,16 @@
          : VBFactory.Add(B, R->getDecl(), V).getRoot();
      }
      default:
-      assert ("SetRVal for given LVal type not yet implemented.");
+      assert ("SetExprVal for given Loc type not yet implemented.");
        return store;
    }
  }

This just seems confusing.  Why is the store reasoning about  
"expression values"?  It makes sense to those using the system  
already, but the name doesn't capture its purpose well.

What do you think?  AbstractVal?  AVal?  ProgVal?

Otherwise I think the patch looks great.  Changing ExprVal to  
something else is just a couple lines of Perl/sed.




More information about the cfe-commits mailing list