danlark added inline comments.

================
Comment at: clang/test/CodeGenCXX/for-loop-init-ternary-operator-statement.cpp:1
+// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o - %s | 
FileCheck %s
+
----------------
rsmith wrote:
> We don't use `-O3` tests for this kind of thing, to avoid depending on the 
> behaviour of the optimizer; instead you should test that the (unoptimized) IR 
> generated by clang is correct.
Done.


================
Comment at: clang/test/PCH/for-loop-init-ternary-operator-statement.cpp:5
+int f() {
+  // CHECK: for (int i = 0; x; i++) {
+  for (int i = 0; int x = i < 2 ? 1 : 0; i++) {
----------------
rsmith wrote:
> This ast-print output looks wrong; I assume that's an unrelated bug?
Yes, I think so, in a buggy version `x` as a second parameter is missing so at 
least it tests correctly


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102502

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

Reply via email to