[PATCH] D70524: Support DebugInfo generation for auto return type for C++ functions.

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 5 13:40:51 PST 2019


probinson added a comment.

In D70524#1771522 <https://reviews.llvm.org/D70524#1771522>, @shafik wrote:

> @probinson I was reading the C++ "auto" return type <http://dwarfstd.org/ShowIssue.php?issue=131217.1> issue and I can't come up with a case where we don't have class descriptions across compilation units that are not consistent wrt to auto return type. Do you have a specific example?


The actual return type is known in a compile_unit where the method is defined, and not known in other compile_units.  If the non-defining compile_units omit the return type, that means "void" not "auto".  That is, one compile unit says it returns "void" and another compile unit says it returns something else.  That is the inconsistency I meant.

If we use unspecified_type instead of omitting the return type, then a consumer knows that the method returns *something*, but it will have to look elsewhere to determine what that is.


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

https://reviews.llvm.org/D70524





More information about the cfe-commits mailing list