[PATCH] D46620: Fix side effect in debug code
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 8 21:11:50 PDT 2018
dsanders added a comment.
Having the side-effect inside the assert is harmless since the #ifndef ensures the whole loop is only built when asserts are enabled and Index is only used by the assert. However, I agree it's weird to have side-effects inside the assert. Moving the increment out of the assert and into the for loop would LGTM
Repository:
rL LLVM
https://reviews.llvm.org/D46620
More information about the llvm-commits
mailing list