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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 11 11:13:23 PDT 2018


aaron.ballman added a comment.

Expounding on my concerns a bit -- I'm worried about all the other places calling `isUndeducedType()` and whether they're also at risk and thus a better fix is to change `isUndeducedType()` to pay attention to the language mode.



================
Comment at: lib/Sema/SemaDecl.cpp:12611
+    // false on C++14's auto return type without trailing return type.
+    DeducedType *DT = FD->getReturnType()->getContainedDeducedType();
+    if (DT && DT->getDeducedType().isNull())
----------------
This can be marked `const`.


Repository:
  rC Clang

https://reviews.llvm.org/D44480





More information about the cfe-commits mailing list