[PATCH] Let partial specs store angle locations for written template args.

Enea Zaffanella zaffanella at cs.unipr.it
Thu Aug 8 02:10:01 PDT 2013


Please find attached a patch for review that adds angle parentheses 
source locations to the written template arguments of (class/var 
template) partial specializations.

The patch uses container ASTTemplateArgumentListInfo to collect all 
relevant info for the explicit template arguments.

A couple of observations/doubts:

1) In SemaTemplateDeduction.cpp there was a comment saying

    // Note that we don't provide the langle and rangle locations.

It was unclear to me whether or not this comment was pointing out a 
deficiency, or just saying that in this cases those locations are 
useless. In the doubt, I choose the safer option, passing down the 
location info.

2) When serializing VarTemplatePartialSpecializationDecl nodes, the 
SequenceNumber was being serialized too. This is not matching the 
corresponding deserialization code, where that field is not read.
Also, no (de-)serialization occurs for that field in the case of class 
template partial specs. Hence I opted for removing it.

Enea.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CTPSD.patch
Type: text/x-diff
Size: 22094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130808/2a837564/attachment.patch>


More information about the cfe-commits mailing list