rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land.
lgtm! So, presumably we still do the wrong thing in the non-method type cases. I came up with this, where we differ with MSVC: struct NonTrivial { NonTrivial(); NonTrivial(const NonTrivial &o); ~NonTrivial(); int x; }; struct Foo { NonTrivial (*fp)(NonTrivial &o); }; Foo gv; MSVC marks the LF_PROCEDURE with the flag, but clang doesn't. It looks like it NonTrivial is incomplete (we have a fwd decl DICompositeType), MSVC just marks it with CxxReturnUdt: struct NonTrivial; struct Foo { NonTrivial (*fp)(NonTrivial &o); }; Foo gv; $ cl -c t.cpp -Z7 && llvm-pdbutil dump -types t.obj | grep -A3 PROCEDU Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28315 for x64 Copyright (C) Microsoft Corporation. All rights reserved. t.cpp 0x1003 | LF_PROCEDURE [size = 16] return type = 0x1000, # args = 1, param list = 0x1002 calling conv = cdecl, options = returns cxx udt Now that I've gone this far... maybe we should just say `isNonTrivial() || isFwdDecl()` -> mark it CxxReturnUdt. Something like that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75215/new/ https://reviews.llvm.org/D75215 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits