[PATCH] D119778: [clang] Add a note "deducing return type for 'foo'"

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 16 11:30:25 PST 2022


rsmith added a comment.

In D119778#3326285 <https://reviews.llvm.org/D119778#3326285>, @Quuxplusone wrote:

> I'll update with the `CodeSynthesisContext` approach in a little bit. But meanwhile there's a problem with both the current patch //and// (I think even more) with the new approach. @rsmith any help?:
> When I try my latest patch with the libc++ tests, with `bin/llvm-lit -sv --param enable_modules=True` (which corresponds to the `-fmodules` compiler flag), I get lots of errors like the following. Do you have any idea what's going wrong?

I don't see any obvious way that this patch could be responsible for that failure, unless it's something like a pre-existing use of uninitialized memory or a use-after-free and this patch is just changing the happenstance behavior.

> I can't minimize the example beyond "all of libc++" because Modules prevents `creduce` from doing anything meaningful. And unfortunately whatever's going wrong seems to be //specifically// about Modules.

It'd likely be useful to know what the `Replacement`  type is, if you can observe this crash in a debugger. I think it's possible for a type that was canonical prior to serialization and deserialization to be non-canonical afterwards (perhaps because we picked a different declaration of the type to be the first one or merged types in a different order or something like that). It may be that we just need to map to a canonical type in some suitable place.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119778/new/

https://reviews.llvm.org/D119778



More information about the cfe-commits mailing list