From d458ceda24fde3bc0f2f910b80e3bd9f990af2fa Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Fri, 11 Jan 2019 04:57:34 +0000 Subject: [Sema] If CheckPlaceholderExpr rewrites the initializer of an auto variable during auto type deduction, use the rewritten initializer when performing initialization of the variable. This silences spurious -Warc-repeated-use-of-weak warnings that are issued when the initializer uses a weak ObjC pointer. Differential Revision: https://reviews.llvm.org/D55662 llvm-svn: 350917 --- clang/include/clang/Sema/Sema.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/include') diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index c79ca74d3213..c9498c19c21e 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -1960,7 +1960,7 @@ public: bool CheckVariableDeclaration(VarDecl *NewVD, LookupResult &Previous); void CheckVariableDeclarationType(VarDecl *NewVD); bool DeduceVariableDeclarationType(VarDecl *VDecl, bool DirectInit, - Expr *Init); + Expr *&Init); void CheckCompleteVariableDeclaration(VarDecl *VD); void CheckCompleteDecompositionDeclaration(DecompositionDecl *DD); void MaybeSuggestAddingStaticToDecl(const FunctionDecl *D); @@ -7095,7 +7095,7 @@ public: QualType deduceVarTypeFromInitializer(VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, - Expr *Init); + Expr *&Init); TypeLoc getReturnTypeLoc(FunctionDecl *FD) const; -- cgit v1.2.3