[llvm] 4525a43 - ImutAVLTree::validateTree - fix null dereference typo warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 10:44:42 PST 2019


Author: Simon Pilgrim
Date: 2019-11-07T18:42:01Z
New Revision: 4525a43c9393b63e144aaeb8854909b37e3371b0

URL: https://github.com/llvm/llvm-project/commit/4525a43c9393b63e144aaeb8854909b37e3371b0
DIFF: https://github.com/llvm/llvm-project/commit/4525a43c9393b63e144aaeb8854909b37e3371b0.diff

LOG: ImutAVLTree::validateTree - fix null dereference typo warning. NFCI.

Noticed by static analyzer.

Added: 
    

Modified: 
    llvm/include/llvm/ADT/ImmutableSet.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h
index 587105431533..a6a6abfd9600 100644
--- a/llvm/include/llvm/ADT/ImmutableSet.h
+++ b/llvm/include/llvm/ADT/ImmutableSet.h
@@ -205,8 +205,7 @@ class ImutAVLTree {
                              ImutInfo::KeyOfValue(getValue()))) &&
            "Value in left child is not less that current value");
 
-
-    assert(!(getRight() ||
+    assert((!getRight() ||
              ImutInfo::isLess(ImutInfo::KeyOfValue(getValue()),
                               ImutInfo::KeyOfValue(getRight()->getValue()))) &&
            "Current value is not less that value of right child");


        


More information about the llvm-commits mailing list