efriedma added a comment.

This is basically what I expected; the general approach seems fine.



================
Comment at: clang/lib/CodeGen/CGExpr.cpp:200
+          E->IgnoreParenNoopCasts(getContext()))) {
+    if (CondOp->getObjectKind() == OK_BitField)
+      return EmitIgnoredConditionalOperator(CondOp);
----------------
Is there some reason we need to special-case bitfields here?


================
Comment at: clang/lib/CodeGen/CGExpr.cpp:4635
+  eval.begin(CGF);
+  Info.LHS = EmitLValueOrThrowExpression(CGF, E->getTrueExpr());
+  eval.end(CGF);
----------------
If we're calling this from EmitIgnoredConditionalOperator, should we be calling 
back into EmitIgnoredExpr, instead of using EmitLValueOrThrowExpression?  
Consider, e.g. `cond ? s1.field1 = val1 : cond2 ? s1.field2 = val2 : s1.field3 
= val3;`.


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

https://reviews.llvm.org/D123680

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

Reply via email to