[cfe-commits] r50098 - /cfe/trunk/lib/Analysis/ExplodedGraph.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Tue Apr 22 00:37:18 PDT 2008


Author: akirtzidis
Date: Tue Apr 22 02:37:18 2008
New Revision: 50098

URL: http://llvm.org/viewvc/llvm-project?rev=50098&view=rev
Log:
Use back() instead of end()-1

Modified:
    cfe/trunk/lib/Analysis/ExplodedGraph.cpp

Modified: cfe/trunk/lib/Analysis/ExplodedGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ExplodedGraph.cpp?rev=50098&r1=50097&r2=50098&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/ExplodedGraph.cpp (original)
+++ cfe/trunk/lib/Analysis/ExplodedGraph.cpp Tue Apr 22 02:37:18 2008
@@ -82,8 +82,8 @@
     return (ExplodedNodeImpl**) (getPtr() ? &P+1 : NULL);
   else {
     // Dereferencing end() is undefined behaviour. The vector is not empty, so
-    // we can dereference the last elem (end()-1) and then add 1 to the result.
-    return const_cast<ExplodedNodeImpl**>(&*(getVector(getPtr()).end()-1)) + 1;
+    // we can dereference the last elem and then add 1 to the result.
+    return const_cast<ExplodedNodeImpl**>(&getVector(getPtr()).back()) + 1;
   }
 }
 





More information about the cfe-commits mailing list