From: Douglas Gregor Date: Mon, 3 May 2010 15:43:53 +0000 (+0000) Subject: When creating the declaration reference for implicit copy-construction X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=62b71f489ec9735cfaa379ee604d0e12dde78975;p=clang When creating the declaration reference for implicit copy-construction of a base class, give it real source-location information. Fixes PR7017. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102916 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 0db0d9e389..58be7aecf0 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -1501,7 +1501,7 @@ BuildImplicitBaseInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor, Expr *CopyCtorArg = DeclRefExpr::Create(SemaRef.Context, 0, SourceRange(), Param, - SourceLocation(), ParamType, 0); + Constructor->getLocation(), ParamType, 0); // Cast to the base class to avoid ambiguities. QualType ArgTy =