[PATCH] Just some comments related to Template Instantiation constructs

Faisal Vali faisalv at gmail.com
Fri May 3 14:46:58 PDT 2013


Ok - Used the appropriate ArrayRef ctor, and folded that line.

No commit access.

Thanks!


Faisal Vali



On Fri, May 3, 2013 at 4:38 PM, Richard Smith <richard at metafoo.co.uk> wrote:

> Also...
>
> --- lib/Sema/SemaTemplateInstantiateDecl.cpp (revision 181010)
> +++ lib/Sema/SemaTemplateInstantiateDecl.cpp (working copy)
> @@ -1152,12 +1152,12 @@
>    // this declaration.
>    FunctionTemplateDecl *FunctionTemplate =
> D->getDescribedFunctionTemplate();
>    if (FunctionTemplate && !TemplateParams) {
> -    std::pair<const TemplateArgument *, unsigned> Innermost
> +    ArrayRef<TemplateArgument> Innermost
>        = TemplateArgs.getInnermost();
>
> May as well fold this to one line now.
>
> On Fri, May 3, 2013 at 2:36 PM, Richard Smith <richard at metafoo.co.uk>wrote:
>
>> The data() + size() changes shouldn't be necessary; there's an
>> ArrayRef(const T *data, size_t length) constructor. Otherwise, looks great.
>> Do you have commit access yet?
>>
>>
>> On Fri, May 3, 2013 at 2:17 PM, Faisal Vali <faisalv at gmail.com> wrote:
>>
>>> As requested - a patch that replaces the pair kludge with ArrayRef.
>>>
>>> Sorry about that earlier non-sense comment - I just assumed I remembered
>>> how that member was used correctly when i fiddled with it last (months
>>> ago).  Should have looked at the code.
>>>
>>> Let me know what you think of this patch.
>>>
>>> Faisal Vali
>>>
>>>
>>>
>>> On Fri, May 3, 2013 at 1:19 PM, Richard Smith <richard at metafoo.co.uk>wrote:
>>>
>>>> The Template.h comment is not right -- an ArgList is really a
>>>> second-rate facsimile of an ArrayRef. A patch making it be a typedef for
>>>> ArrayRef<TemplateArgument> would be great, though...
>>>>
>>>> getTemplateInstantiationArgs already has a doc comment in
>>>> SemaTemplateInstantiate.cpp, which seems pretty good.
>>>>
>>>>
>>>> On Fri, May 3, 2013 at 8:00 AM, Faisal Vali <faisalv at gmail.com> wrote:
>>>>
>>>>> What do you think Richard?  Are the comments accurate - and should we
>>>>> add them?
>>>>>
>>>>> Faisal Vali
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130503/5e5eff96/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replace-pair-with-array-ref-in-mltalist.patch
Type: application/octet-stream
Size: 7200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130503/5e5eff96/attachment.obj>


More information about the cfe-commits mailing list