GorNishanov marked an inline comment as done.
GorNishanov added inline comments.


================
Comment at: lib/Sema/SemaCoroutine.cpp:451
       if (RetType->isReferenceType() ||
           (AdjRetType != S.Context.BoolTy && AdjRetType != S.Context.VoidTy)) {
         S.Diag(AwaitSuspend->getCalleeDecl()->getLocation(),
----------------
rsmith wrote:
> Don't desugar the type; instead, use `AdjRetType->isBooleanType() || 
> AdjRetType->isVoidType()` here. You can also delete the 
> `getUnqualifiedType()` call above if you do this, and just use `RetType` 
> here, since `->isBooleanType()` on `const bool` returns `true`.
Cool! Much shorter and prettier. Thank you!


https://reviews.llvm.org/D37454



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to