]> granicus.if.org Git - clang/commitdiff
Fix r255875, use '<' instead of '==' for 'operator<'
authorRichard Trieu <rtrieu@google.com>
Thu, 17 Dec 2015 21:56:22 +0000 (21:56 +0000)
committerRichard Trieu <rtrieu@google.com>
Thu, 17 Dec 2015 21:56:22 +0000 (21:56 +0000)
Aaron Ballman pointed out a typo from the copy and paste in r255875.  This will
preserve the strict weak ordering when comparing DynTypedNode.

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

include/clang/AST/ASTTypeTraits.h

index a1aad0bd2a5af71ec9399441cb87a5cf7f077bee..dcaac802c110a903967a23dcfdf601c4b1c99898 100644 (file)
@@ -272,7 +272,7 @@ public:
       return NodeKind < Other.NodeKind;
 
     if (ASTNodeKind::getFromNodeKind<QualType>().isSame(NodeKind))
-      return getUnchecked<QualType>().getAsOpaquePtr() ==
+      return getUnchecked<QualType>().getAsOpaquePtr() <
              Other.getUnchecked<QualType>().getAsOpaquePtr();
 
     if (ASTNodeKind::getFromNodeKind<TypeLoc>().isSame(NodeKind)) {