summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-02-14 14:13:00 +0000
committerdim <dim@FreeBSD.org>2015-02-14 14:13:00 +0000
commit9377b5ad0feb5dd018ed6cfc6378ac19c1252dfe (patch)
treea7bc5b362ad6182396e88b223352f75d52966813 /contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp
parentff34755926ad8a77e4498e82a23c847d33c6c72d (diff)
downloadFreeBSD-src-9377b5ad0feb5dd018ed6cfc6378ac19c1252dfe.zip
FreeBSD-src-9377b5ad0feb5dd018ed6cfc6378ac19c1252dfe.tar.gz
Merge llvm 3.6.0rc3 from ^/vendor/llvm/dist, merge clang 3.6.0rc3 from
^/vendor/clang/dist, resolve conflicts, and update patches README.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp
index b556f18..c6af2ed 100644
--- a/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp
+++ b/contrib/llvm/tools/clang/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<InitListExpr>(Init)) {
+ Diag(Init->getLocStart(),
+ diag::warn_auto_var_direct_list_init)
+ << FixItHint::CreateInsertion(Init->getLocStart(), "=");
+ }
}
// dllimport cannot be used on variable definitions.
OpenPOWER on IntegriCloud