[PATCH] D74116: [Sema][C++] Strawman patch to propagate conversion type in order to specialize the diagnostics

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 17 10:03:21 PST 2020


rjmccall added inline comments.


================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:3880
+        ToType, From->getType(), From, Action);
+    // assert(Diagnosed && "failed to diagnose bad conversion");
+    (void)Diagnosed;
----------------
Anastasia wrote:
> rjmccall wrote:
> > This assertion seems important; can we make it work?
> Currently DiagnoseAssignmentResult returns true only for `Incompatible` , However we can change it to return true for all `Incompatibel*` in C++ mode. So yes it should be doable.
Okay.  My guess is it should return true whenever we emit an error rather than a warning (ignoring the effects of things like `-Werror`, of course).


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

https://reviews.llvm.org/D74116





More information about the cfe-commits mailing list