diff options
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index f98efec5ed..31692fc1f2 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -1908,10 +1908,10 @@ TemplateDeclInstantiator::SubstFunctionType(FunctionDecl *D, if (NewTInfo != OldTInfo) { // Get parameters from the new type info. - TypeLoc OldTL = OldTInfo->getTypeLoc(); + TypeLoc OldTL = OldTInfo->getTypeLoc().IgnoreParens(); if (FunctionProtoTypeLoc *OldProtoLoc = dyn_cast<FunctionProtoTypeLoc>(&OldTL)) { - TypeLoc NewTL = NewTInfo->getTypeLoc(); + TypeLoc NewTL = NewTInfo->getTypeLoc().IgnoreParens(); FunctionProtoTypeLoc *NewProtoLoc = cast<FunctionProtoTypeLoc>(&NewTL); assert(NewProtoLoc && "Missing prototype?"); for (unsigned i = 0, i_end = NewProtoLoc->getNumArgs(); i != i_end; ++i) { @@ -1926,7 +1926,7 @@ TemplateDeclInstantiator::SubstFunctionType(FunctionDecl *D, // The function type itself was not dependent and therefore no // substitution occurred. However, we still need to instantiate // the function parameters themselves. - TypeLoc OldTL = OldTInfo->getTypeLoc(); + TypeLoc OldTL = OldTInfo->getTypeLoc().IgnoreParens(); if (FunctionProtoTypeLoc *OldProtoLoc = dyn_cast<FunctionProtoTypeLoc>(&OldTL)) { for (unsigned i = 0, i_end = OldProtoLoc->getNumArgs(); i != i_end; ++i) { |