[PATCH] D157526: [clang][Sema] Remove irrelevant diagnostics from constraint satisfaction failure

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 6 05:54:01 PDT 2023


cor3ntin added a comment.

Given that we still need to check for substitution errors in untaken branches, this look reasonable (especially as i think you are right that alternative approaches are likely to be more complex) however i think it does require a comment, and I'd like @erichkeane to have the final say.



================
Comment at: clang/lib/Sema/SemaConcept.cpp:220-224
+    bool IsRHSSatisfied = Satisfaction.IsSatisfied;
+    if (BO.isOr() && IsRHSSatisfied)
+      Satisfaction.Details.erase(EffectiveDetailEnd,
+                                 Satisfaction.Details.end());
+
----------------
This really needs a comment explaining that we are pruning details that do not matter for satisfaction, and a FIXME along the line of what Erich suggested.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157526



More information about the cfe-commits mailing list