From 0d6f1ffeea490296fc2880844da9ee3a38a1bbdf Mon Sep 17 00:00:00 2001 From: dim Date: Tue, 27 Feb 2018 19:02:49 +0000 Subject: [PATCH] Avoid using the C++11 auto keyword, which was introduced in r328555, as part of an upstream change. This is not supported by gcc 4.2.1, which is still the default system compiler for some architectures. Direct commit to stable/9 and stable/10, since this does not apply to stable/11 and head. Reported by: jau@iki.fi PR: 202665,226068 git-svn-id: svn://svn.freebsd.org/base/stable/9@330080 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp index a680a191c..6de3705a8 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp @@ -6316,7 +6316,7 @@ static void diagnoseListInit(Sema &S, const InitializedEntity &Entity, QualType T = DestType->getAs()->getPointeeType(); diagnoseListInit(S, InitializedEntity::InitializeTemporary(T), InitList); SourceLocation Loc = InitList->getLocStart(); - if (auto *D = Entity.getDecl()) + if (DeclaratorDecl *D = Entity.getDecl()) Loc = D->getLocation(); S.Diag(Loc, diag::note_in_reference_temporary_list_initializer) << T; return; -- 2.45.0