r255929 - Fix r255875, use '<' instead of '==' for 'operator<'

Richard Trieu via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 17 13:56:23 PST 2015


Author: rtrieu
Date: Thu Dec 17 15:56:22 2015
New Revision: 255929

URL: http://llvm.org/viewvc/llvm-project?rev=255929&view=rev
Log:
Fix r255875, use '<' instead of '==' for 'operator<'

Aaron Ballman pointed out a typo from the copy and paste in r255875.  This will
preserve the strict weak ordering when comparing DynTypedNode.

Modified:
    cfe/trunk/include/clang/AST/ASTTypeTraits.h

Modified: cfe/trunk/include/clang/AST/ASTTypeTraits.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTTypeTraits.h?rev=255929&r1=255928&r2=255929&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ASTTypeTraits.h (original)
+++ cfe/trunk/include/clang/AST/ASTTypeTraits.h Thu Dec 17 15:56:22 2015
@@ -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)) {




More information about the cfe-commits mailing list