[cfe-commits] r120969 - in /cfe/trunk: include/clang/Checker/PathSensitive/Environment.h lib/Checker/Environment.cpp

Ted Kremenek kremenek at apple.com
Sun Dec 5 15:36:15 PST 2010


Author: kremenek
Date: Sun Dec  5 17:36:15 2010
New Revision: 120969

URL: http://llvm.org/viewvc/llvm-project?rev=120969&view=rev
Log:
Rename Environment::LookupExpr() to
Environment::lookupExpr() and move its implementation
out-of-line.

Modified:
    cfe/trunk/include/clang/Checker/PathSensitive/Environment.h
    cfe/trunk/lib/Checker/Environment.cpp

Modified: cfe/trunk/include/clang/Checker/PathSensitive/Environment.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Checker/PathSensitive/Environment.h?rev=120969&r1=120968&r2=120969&view=diff
==============================================================================
--- cfe/trunk/include/clang/Checker/PathSensitive/Environment.h (original)
+++ cfe/trunk/include/clang/Checker/PathSensitive/Environment.h Sun Dec  5 17:36:15 2010
@@ -40,15 +40,13 @@
   Environment(BindingsTy eb)
     : ExprBindings(eb) {}
 
+  SVal lookupExpr(const Stmt* E) const;
+
 public:
   typedef BindingsTy::iterator iterator;
   iterator begin() const { return ExprBindings.begin(); }
   iterator end() const { return ExprBindings.end(); }
 
-  SVal LookupExpr(const Stmt* E) const {
-    const SVal* X = ExprBindings.lookup(E);
-    return X ? *X : UnknownVal();
-  }
 
   /// GetSVal - Fetches the current binding of the expression in the
   ///  Environment.

Modified: cfe/trunk/lib/Checker/Environment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/Environment.cpp?rev=120969&r1=120968&r2=120969&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/Environment.cpp (original)
+++ cfe/trunk/lib/Checker/Environment.cpp Sun Dec  5 17:36:15 2010
@@ -17,6 +17,15 @@
 
 using namespace clang;
 
+SVal Environment::lookupExpr(const Stmt* E) const {
+  const SVal* X = ExprBindings.lookup(E);
+  if (X) {
+    SVal V = *X;
+    return V;
+  }
+  return UnknownVal();
+}
+
 SVal Environment::getSVal(const Stmt *E, SValBuilder& svalBuilder) const {
   for (;;) {
     switch (E->getStmtClass()) {
@@ -75,7 +84,7 @@
     };
     break;
   }
-  return LookupExpr(E);
+  return lookupExpr(E);
 }
 
 Environment EnvironmentManager::bindExpr(Environment Env, const Stmt *S,





More information about the cfe-commits mailing list