gromer added inline comments.

================
Comment at: b/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp:601
+    case MaybeFallThrough:
+      if (ReturnsValue)
+        S.Diag(RBrace, diag::warn_maybe_falloff_nonvoid_coroutine)
----------------
rsmith wrote:
> This `if` and the one below are redundant now.
Leaving aside the mismatch between the locations passed to `isIgnored` and 
`Diag`, I believe this `if` still has an observable effect (namely suppressing 
the diagnostic) in the case where `ReturnsValue` is false, `HasNoReturnAttr` is 
true, and neither diagnostic is ignored.

Even if I'm wrong about that, it's not clear to me whether the error is here or 
in the early return condition (as noted in the FIXME above, the two do not 
appear to match up).


https://reviews.llvm.org/D51812



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

Reply via email to