[PATCH] D44480: [Sema] Don't skip function bodies with 'auto' without trailing return type

Nikolai Kosjar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 30 08:39:18 PDT 2018


nik added a comment.

I've stumbled about this bug too and was looking into it and then I saw the mail about this change being submitted :)

I've ended up with a slightly different change (https://dpaste.de/PSpM/raw , instead of FD->getReturnType()->getContainedDeducedType() I have FD->getReturnType()->getAs<AutoType>()). It looks like the tests from this change pass with my change and my tests pass with this change (consider to add decltype(auto) tests, too!). So I'm wondering whether there is a test case that fails for one change but not the other (if there is, the test case should probably be added), or if there are differences in the performance.

I'm not familiar enough with the code base to justify the getAs<AutoType>(), I've just observed that it made my tests pass.


Repository:
  rL LLVM

https://reviews.llvm.org/D44480





More information about the llvm-commits mailing list