Hi,<div><br></div><div>The constexpr specifier implicitly marks non-static member function declarations as const. We currently look at the storage class of the function to determine whether this marking applies, but as PR12008 points out, this is inadequate: for out-of-line definitions of constexpr member functions, we don't know whether the function is static until we have looked up the previous declaration (and performed some other semantic checks).</div>

<div><br></div><div>The attached patch fixes this by delaying the addition of the const qualifier to a constexpr non-static member function until the point where we know it's not static. For efficiency, the patch modifies the type of the TypeSourceInfo object in-place; this is safe because the reference to the TypeSourceInfo object is unique, and the addition of a 'const' qualifier does not change the TypeLoc representation.</div>

<div><br></div><div>Thanks!</div><div>Richard</div>