[PATCH] Preserve paramater attributes during template instantiation
Doug Gregor
dgregor at apple.com
Thu Mar 7 17:15:58 PST 2013
Two comments:
1) I think you'll need to teach SemaTemplate.cpp's StripImplicitInstantiation() to strip the attributes off the parameters of a FunctionDecl, because a specialization should not inherit the parameter attributes from the implicit instantiation.
2) Regarding the case that's not working, the problem is that Sema::SubstituteExplicitTemplateArguments is calling Sema::BuildFunctionType() directly, which takes a FunctionType::ExtInfo... which drops the consumed-arguments information present in FunctionProtoType::ExtProtoInfo. We need to propagate that consumed-arguments info here for the function types to match.
http://llvm-reviews.chandlerc.com/D474
More information about the cfe-commits
mailing list