]> granicus.if.org Git - clang/commitdiff
Make sure we're comparing the canonical types when we determine
authorDouglas Gregor <dgregor@apple.com>
Tue, 15 Sep 2009 20:50:23 +0000 (20:50 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 15 Sep 2009 20:50:23 +0000 (20:50 +0000)
whether a constructor is a copy constructor.

Sadly, I wasn't able to get down to a test case smaller than libstdc++'s
<string>.

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

lib/AST/DeclCXX.cpp

index 591f856c2c1f773e947f0239345a34a1f5030c63..87550671379cc843222bf681b28faa0fdb2f49ea 100644 (file)
@@ -592,9 +592,10 @@ CXXConstructorDecl::isCopyConstructor(ASTContext &Context,
     return false;
 
   // Is it a reference to our class type?
-  QualType PointeeType
+  CanQualType PointeeType
     = Context.getCanonicalType(ParamRefType->getPointeeType());
-  QualType ClassTy = Context.getTagDeclType(getParent());
+  CanQualType ClassTy 
+    = Context.getCanonicalType(Context.getTagDeclType(getParent()));
   if (PointeeType.getUnqualifiedType() != ClassTy)
     return false;