I think r121490 has already addressed this, but let us know if not.<div><font class="Apple-style-span" face="arial, sans-serif" size="3"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font><div class="gmail_quote">
On Fri, Dec 10, 2010 at 10:12 AM, Paul Curtis <span dir="ltr"><<a href="mailto:plc@rowley.co.uk">plc@rowley.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
In NamedDecl*Sema::ActOnFunctionDeclarator(...) in SemaDecl.cpp there is a<br>
path to this, labelled (HACK), where isExplicitSpecialization has not been<br>
initialized.<br>
<br>
  bool OverloadableAttrRequired=false; // FIXME: HACK!<br>
  if (!getLangOptions().CPlusPlus) {<br>
    // Perform semantic checking on the function declaration.<br>
    CheckFunctionDeclaration(S, NewFD, Previous, isExplicitSpecialization,<br>
                             Redeclaration,<br>
                             /*FIXME:*/OverloadableAttrRequired);<br>
    assert((NewFD->isInvalidDecl() || !Redeclaration ||<br>
            Previous.getResultKind() != LookupResult::FoundOverloaded) &&<br>
           "previous declaration set still overloaded");<br>
  }<br>
<br>
This is because it, um, it hasn't been (when indexing some of my files--I<br>
don't quite know which yet).<br>
<br>
In one path of ActOnFunctionDeclarator() it is left untouched, hence, adding<br>
isExplicitSpecialization = false on this branch solves it.<br>
<br>
  if (!getLangOptions().CPlusPlus) {<br>
    // Determine whether the function was written with a<br>
    // prototype. This true when:<br>
    //   - there is a prototype in the declarator, or<br>
    //   - the type R of the function is some kind of typedef or other<br>
reference<br>
    //     to a type name (which eventually refers to a function type).<br>
    ...<br>
<br>
Attached a patch against the trunk which fixes it for me.  Not sure whether<br>
this is the right fix or not, but at least I don't come a cropper in the<br>
MSVC debugger any more.<br>
<br>
Stylistically, you may wish to set isExplicitSpecialization false with an<br>
initializer.<br>
<font color="#888888"><br>
--<br>
Paul Curtis, Rowley Associates Ltd   <a href="http://www.rowley.co.uk" target="_blank">http://www.rowley.co.uk</a><br>
SolderCore arriving Winter 2010!   <a href="http://www.soldercore.com" target="_blank">http://www.soldercore.com</a><br>
<br>
</font><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>