]> granicus.if.org Git - clang/commitdiff
Canonicalize the base class used in the nested-name-specifier of a generated
authorManuel Klimek <klimek@google.com>
Mon, 6 Feb 2012 21:51:39 +0000 (21:51 +0000)
committerManuel Klimek <klimek@google.com>
Mon, 6 Feb 2012 21:51:39 +0000 (21:51 +0000)
assignment operator.

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

lib/Sema/SemaDeclCXX.cpp

index 68f6caad0b7791770f7934afb8ea0de2a1abb838..2c1642361b807d1b6c21872e21be00405cb71537 100644 (file)
@@ -7601,9 +7601,10 @@ BuildSingleCopyAssign(Sema &S, SourceLocation Loc, QualType T,
     // reference to operator=; this is required to suppress the virtual
     // call mechanism.
     CXXScopeSpec SS;
+    const Type *CanonicalT = S.Context.getCanonicalType(T.getTypePtr());
     SS.MakeTrivial(S.Context, 
                    NestedNameSpecifier::Create(S.Context, 0, false, 
-                                               T.getTypePtr()),
+                                               CanonicalT),
                    Loc);
     
     // Create the reference to operator=.