<br><br><div class="gmail_quote">2011/9/19 Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello Stepan,<br>
<br>
On Sep 15, 2011, at 1:28 PM, Stepan Dyatkovskiy wrote:<br>
<br>
> C++ does not allow member templates. Clang doesn't check for this case and crash.<br>
><br>
> Please find attach the patch which fixes this.<br>
<br>
+ // FIXME: Check that the name is an identifier!<br>
+ IdentifierInfo *II = Name.getAsIdentifierInfo();<br>
+<br>
+ // Match up the template parameter lists with the scope specifier, then<br>
+ // determine whether we have a template or a template specialization.<br>
+ bool isExplicitSpecialization = false;<br>
+ bool Invalid = false;<br>
+ if (TemplateParameterList *TemplateParams =<br>
+ MatchTemplateParametersToScopeSpecifier(<br>
+ D.getDeclSpec().getSourceRange().getBegin(),<br>
+ D.getIdentifierLoc(),<br>
+ D.getCXXScopeSpec(),<br>
+ TemplateParameterLists.get(),<br>
+ TemplateParameterLists.size(),<br>
+ /*never a friend*/false,<br>
+ isExplicitSpecialization,<br>
+ Invalid)) {<br>
<br>
Why are we even trying to match up the template parameter lists here? One isn't allowed to write a specialization inside a class, much less a specialization that looks like a variable. Couldn't this be a simpler "is there a template parameter list" check?<br>
<br>
- Doug<br></blockquote><div> </div></div>Does not MSVC allow member function templates to be specialized within the class directly ?<br><br>-- Matthieu.<br>