Fznamznon added inline comments.

================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:11141-11145
     if (!Chunk.Fun.hasTrailingReturnType()) {
+      IsValid = false;
       Diag(D.getName().getBeginLoc(),
            diag::err_deduction_guide_no_trailing_return_type);
       break;
----------------
rsmith wrote:
> Can we just return immediately here? I don't see a reason to keep going -- 
> this error may well indicate that the developer didn't actually mean to 
> declare a deduction guide in the first place, so the diagnostic on a function 
> body below is likely to not be useful.
NIT: You can also just do `return Diag(...)` here and in other places. This is 
equal to `return true`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149516

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

Reply via email to