tbaeder added inline comments.

================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:531-534
+  // For C, cast back to integer type.
+  assert(T);
+  if (T != PT_Bool)
+    return this->emitCast(PT_Bool, *T, E);
----------------
aaron.ballman wrote:
> This is casting to boolean type, not integer type -- shouldn't that be 
> emitting an int?
That line is casting from `PT_Bool` to `T`, because we visited the operands as 
bool and now we need to convert back to whatever type we should have.


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

https://reviews.llvm.org/D157174

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

Reply via email to