This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Improve macro hygiene in wasm_simd128.h
ClosedPublic

Authored by tlively on Jun 1 2020, 5:46 PM.

Details

Summary

The shuffle intrinsic macros did not parenthesize usages of their
constant parameters, which could lead to incorrect results due to
operator precedence issues. This patch fixes the problem by adding the
missing paretheses.

Diff Detail

Event Timeline

tlively created this revision.Jun 1 2020, 5:46 PM
aheejin accepted this revision.Jun 1 2020, 10:00 PM
aheejin added inline comments.
clang/lib/Headers/wasm_simd128.h
1040

It's interesting that clang-format deletes whitespaces around parenthesized expressions...

This revision is now accepted and ready to land.Jun 1 2020, 10:00 PM
This revision was automatically updated to reflect the committed changes.