erik.pilkington added a comment.

Hi, thanks for working on this!
Can you add tests to make sure that this also works with switch statements 
(which also have this bug), and not with while?  Also, it makes it a lot easier 
to review these patches if you add context lines to the diff.
Thanks,
Erik



================
Comment at: lib/Parse/ParseExprCXX.cpp:1750
+    //   if (; true);
+    if (TryConsumeToken(tok::semi))
+      return ParseCXXCondition(nullptr, Loc, CK);
----------------
We should only be doing this if InitStmt != nullptr, right? I think this would 
lead us to be too permissive with while statements, which don't have this 
feature. Also, it would be nice to emit a c++14-compat warning here, like below.


https://reviews.llvm.org/D40445



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

Reply via email to