aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-23 23:04:10 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-23 23:04:10 +0000
commit739d8283149d999f598a7514c6ec2b42598f51d3 (patch)
treee6d7b5a119af205d13f33998f73d3e8371014630 /lib/Sema/SemaInit.cpp
parent96be6917e1c4ba1f4435a14c9e7c6c139571d086 (diff)
Improve diagnostic location information when checking the initialization of a reference
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index c430751c2e..27f0896807 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -144,7 +144,7 @@ bool Sema::CheckInitializerTypes(Expr *&Init, QualType &DeclType,
// (8.3.2), shall be initialized by an object, or function, of
// type T or by an object that can be converted into a T.
if (DeclType->isReferenceType())
- return CheckReferenceInit(Init, DeclType,
+ return CheckReferenceInit(Init, DeclType, InitLoc,
/*SuppressUserConversions=*/false,
/*AllowExplicit=*/DirectInit,
/*ForceRValue=*/false);
@@ -801,6 +801,7 @@ void InitListChecker::CheckReferenceType(InitListExpr *IList, QualType DeclType,
Expr *savExpr = expr; // Might be promoted by CheckSingleInitializer.
if (SemaRef.CheckReferenceInit(expr, DeclType,
+ /*FIXME:*/expr->getLocStart(),
/*SuppressUserConversions=*/false,
/*AllowExplicit=*/false,
/*ForceRValue=*/false))