Moved method call within a conditional branch because its effects will
authorTed Kremenek <kremenek@apple.com>
Mon, 21 Jan 2008 22:51:35 +0000 (22:51 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 21 Jan 2008 22:51:35 +0000 (22:51 +0000)
be ignored on the false branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46228 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/ImmutableSet.h

index 856667d1219069a66c976c77cc97aa68db9e73d6..11724603647e855ae4ff129043261e56a49cd0fe 100644 (file)
@@ -219,9 +219,9 @@ private:
     //  of the last item hash and the the next item.
     
     unsigned X = ID.ComputeHash();
-    ID.clear();
     
     if (R) {
+      ID.clear();
       ID.AddInteger(X);
       ID.AddInteger(R->ComputeHash());
       X = ID.ComputeHash();