[PATCH] D102502: [clang] Fix ternary operator in second for loop argument

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 14 08:40:07 PDT 2021


lebedev.ri added a comment.

This should have codegen, and maybe AST, tests.



================
Comment at: clang/test/Parser/cxx2a-init-statement.cpp:18
 
+  for (int i = 0; int x = i < 2 ? 1 : 0; i++) {}
+
----------------
This isn't cxx2a-specific isn't it?
Isn't this valid even in C99?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102502



More information about the cfe-commits mailing list