One more step towards implementing constexpr lambdas.
In passing, also fix it so that when we emit a diagnostic referencing a lambda, instead of using the nameless CXXRecordDecl, use its type.
All regressions pass.
Differential D22662
[cxx1z-constexpr-lambda] Make a lambda's closure type a literal type in C++1z. faisalv on Jul 21 2016, 8:01 PM. Authored by
Details One more step towards implementing constexpr lambdas. In passing, also fix it so that when we emit a diagnostic referencing a lambda, instead of using the nameless CXXRecordDecl, use its type. All regressions pass.
Diff Detail Event TimelineComment Actions Factor out the diagnostic builder RAII creation (through Sema.Diag) and reduce repetition. Comment Actions Everything other than the diagnostics change LGTM; can we handle the diagnostics change as a central patch and put this fallback logic directly into the diagnostics formatting code, so it applies everywhere we try to print the name of an unnamed class?
Comment Actions Thanks Richard. Your request to separate out and centralize the diagnostic portion of the patch certainly seems like a good idea - and I shall do so separately. The approved portion of this small patch is committed as: r276514. http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160718/165670.html Thanks! |
This seems like something that would be better handled centrally by the diagnostics machinery.