From 5b6a3ddda0669b6e3ea3de1f239eee40004423e5 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Mon, 6 Feb 2012 21:51:39 +0000 Subject: [PATCH] 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 --- lib/Sema/SemaDeclCXX.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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=. -- 2.40.0