]> granicus.if.org Git - clang/commitdiff
Fix typo in ASTStructuralEquivalence.cpp for UnaryTransform types.
authorEric Fiselier <eric@efcs.ca>
Wed, 4 Apr 2018 06:31:21 +0000 (06:31 +0000)
committerEric Fiselier <eric@efcs.ca>
Wed, 4 Apr 2018 06:31:21 +0000 (06:31 +0000)
Previously UnaryTransformType nodes were comparing the same node
for structural equivalence. This was due to a typo where T1 was
on both sides of the comparison. This patch corrects that typo.

Unfortunately I couldn't find a way to test this change. It seems
that currently UnaryTransform nodes are never actually checked
for equivalence, only their canonical types are.

None the less, this correction seemed appropriate.

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

lib/AST/ASTStructuralEquivalence.cpp

index a563c7e2fa0616eb03a4aac3031728e0321463a5..da0a26e40b11712129c7130715d9012c8f8eef0b 100644 (file)
@@ -501,7 +501,7 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
   case Type::UnaryTransform:
     if (!IsStructurallyEquivalent(
             Context, cast<UnaryTransformType>(T1)->getUnderlyingType(),
-            cast<UnaryTransformType>(T1)->getUnderlyingType()))
+            cast<UnaryTransformType>(T2)->getUnderlyingType()))
       return false;
     break;