From: Manuel Klimek Date: Mon, 6 Feb 2012 21:51:39 +0000 (+0000) Subject: Canonicalize the base class used in the nested-name-specifier of a generated X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b6a3ddda0669b6e3ea3de1f239eee40004423e5;p=clang Canonicalize the base class used in the nested-name-specifier of a generated assignment operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149909 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 68f6caad0b..2c1642361b 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -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=.