diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-23 23:04:10 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-23 23:04:10 +0000 |
commit | c809cc2efaaaf0b1b8dda0a799c22876685a5f98 (patch) | |
tree | 6a18ca9371b75656a472820b1b9f3798581cdb91 /clang/lib/Sema/SemaInit.cpp | |
parent | 96ab942a6972c4342351eb52118cf47c721c90b1 (diff) | |
download | bcm5719-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.cpp | 3 |
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)) |