summaryrefslogtreecommitdiffstats
path: root/clang/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
commitc809cc2efaaaf0b1b8dda0a799c22876685a5f98 (patch)
tree6a18ca9371b75656a472820b1b9f3798581cdb91 /clang/lib/Sema/SemaInit.cpp
parent96ab942a6972c4342351eb52118cf47c721c90b1 (diff)
downloadbcm5719-llvm-c809cc2efaaaf0b1b8dda0a799c22876685a5f98.tar.gz
bcm5719-llvm-c809cc2efaaaf0b1b8dda0a799c22876685a5f98.zip
Improve diagnostic location information when checking the initialization of a reference
llvm-svn: 82666
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r--clang/lib/Sema/SemaInit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index c430751c2e2..27f08968076 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/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))
OpenPOWER on IntegriCloud