diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:59:51 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:59:51 +0000 | 
| commit | 7cb19e8bd99e7a7f926ad363aa2b4dd58fb8e380 (patch) | |
| tree | 8d5195e81c160c2a7c7d93674e053a67d0f31092 /contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | |
| parent | 1c4688a8498fea1db507842ff8dedaacad8ef77b (diff) | |
| parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
| -rw-r--r-- | contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index 5109dc8290f9..86492716f685 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -729,7 +729,7 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D,                            DI, D->getStorageClass());    // In ARC, infer 'retaining' for variables of retainable type. -  if (SemaRef.getLangOpts().ObjCAutoRefCount &&  +  if (SemaRef.getLangOpts().ObjCAutoRefCount &&        SemaRef.inferObjCARCLifetime(Var))      Var->setInvalidDecl(); @@ -2056,7 +2056,7 @@ TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D,    // previous declaration we just found.    if (isFriend && Method->getPreviousDecl())      Method->setAccess(Method->getPreviousDecl()->getAccess()); -  else  +  else      Method->setAccess(D->getAccess());    if (FunctionTemplate)      FunctionTemplate->setAccess(Method->getAccess()); @@ -3417,7 +3417,7 @@ TemplateDeclInstantiator::SubstFunctionType(FunctionDecl *D,      ThisContext = cast<CXXRecordDecl>(Owner);      ThisTypeQuals = Method->getTypeQualifiers();    } -   +    TypeSourceInfo *NewTInfo      = SemaRef.SubstFunctionDeclType(OldTInfo, TemplateArgs,                                      D->getTypeSpecStartLoc(), @@ -4890,14 +4890,14 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D,                            const MultiLevelTemplateArgumentList &TemplateArgs,                            bool FindingInstantiatedContext) {    DeclContext *ParentDC = D->getDeclContext(); -  // FIXME: Parmeters of pointer to functions (y below) that are themselves  +  // FIXME: Parmeters of pointer to functions (y below) that are themselves    // parameters (p below) can have their ParentDC set to the translation-unit -  // - thus we can not consistently check if the ParentDC of such a parameter  +  // - thus we can not consistently check if the ParentDC of such a parameter    // is Dependent or/and a FunctionOrMethod. -  // For e.g. this code, during Template argument deduction tries to  +  // For e.g. this code, during Template argument deduction tries to    // find an instantiated decl for (T y) when the ParentDC for y is -  // the translation unit.   -  //   e.g. template <class T> void Foo(auto (*p)(T y) -> decltype(y())) {}  +  // the translation unit. +  //   e.g. template <class T> void Foo(auto (*p)(T y) -> decltype(y())) {}    //   float baz(float(*)()) { return 0.0; }    //   Foo(baz);    // The better fix here is perhaps to ensure that a ParmVarDecl, by the time | 
