urnathan added inline comments.

================
Comment at: clang/lib/Sema/SemaTemplate.cpp:2658-2682
+    Expr::EvalResult EVRX, EVRY;
+    if (!DefaultArgumentX->EvaluateAsConstantExpr(EVRX, C) ||
+        !DefaultArgumentY->EvaluateAsConstantExpr(EVRY, C))
+      return false;
+
+    APValue VX = EVRX.Val, VY = EVRY.Val;
+    if (VX.getKind() != VY.getKind())
----------------
ChuanqiXu wrote:
> urnathan wrote:
> > I'm kind of surprised how complex this check is.  Isn't there an AST 
> > comparator available somewhere?
> I found ODRHash. I think it is much better now.
hm that suggests there there must be a comparator too -- this isn't a 
cryptographically strong hash is it?  How would the compiler currently make use 
of 'definitely different' and 'probably the same' without such a comparator?


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

https://reviews.llvm.org/D118034

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

Reply via email to