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 0db0d9e..58be7ae 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -1501,7 +1501,7 @@
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 =