From ff28d95d1f024411955913aaa68c17f2b09c46fd Mon Sep 17 00:00:00 2001 From: dim Date: Sat, 14 Feb 2015 12:18:48 +0000 Subject: Vendor import of clang RELEASE_360/rc3 tag r229040 (effectively, 3.6.0 RC3): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc3@229040 --- lib/Sema/SemaDecl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Sema/SemaDecl.cpp') diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index b556f18..c6af2ed 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -8702,6 +8702,14 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, CheckVariableDeclarationType(VDecl); if (VDecl->isInvalidDecl()) return; + + // If all looks well, warn if this is a case that will change meaning when + // we implement N3922. + if (DirectInit && !CXXDirectInit && isa(Init)) { + Diag(Init->getLocStart(), + diag::warn_auto_var_direct_list_init) + << FixItHint::CreateInsertion(Init->getLocStart(), "="); + } } // dllimport cannot be used on variable definitions. -- cgit v1.1