[PATCH] D36768: [test-suite] Add -i option to fpcmp to ignore whitespace changes.
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 21 12:18:07 PDT 2017
hfinkel added inline comments.
================
Comment at: tools/fpcmp.c:283
+ if (ignore_whitespace) {
+ if (skip_whitespace(&F1P, File1End) | skip_whitespace(&F2P, File2End))
+ continue;
----------------
Meinersbur wrote:
> hfinkel wrote:
> > Any particular reason you're using a bitwise instead of logical or. If not, I'd prefer `||` here.
> Yes, `skip_whitespace` has side-effects in that it advances the `F1P`/`F2P` pointers. When using the shortcut operators, `F2P` would no advance whitespace. However, the semantics are the same because in the next iteration `skip_whitespace` for `F1P` will return false and `F2P` will advance.
>
> I know that using `|` for a logical operation is uncommon. The alternative is to store the return value of `skip_whitespace` into temporaries.
Okay. The code is fine in that case.
https://reviews.llvm.org/D36768
More information about the llvm-commits
mailing list