diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2019-01-11 04:57:34 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2019-01-11 04:57:34 +0000 |
commit | d458ceda24fde3bc0f2f910b80e3bd9f990af2fa (patch) | |
tree | 76a3709db53d61060dd18ebd5c56fe196d432b34 /clang/include | |
parent | eb139def3d9b06b9c477148a74d5cc7dedecc3f5 (diff) |
[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
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/Sema/Sema.h | 4 |
1 files changed, 2 insertions, 2 deletions
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; |