[PATCH] D105892: [NFC] Silence build warning by placing parentheses around condition

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 13 07:04:54 PDT 2021


thakis added a comment.

This is not NFC, is it? Before, this got evaluated as `(!S.getLangOpts().OpenCLCPlusPlus && S.getLangOpts().OpenCLVersion < 200) || (S.getLangOpts().OpenCLVersion == 300 && !S.getOpenCLOptions().isSupported("__opencl_c_read_write_images", S.getLangOpts()))`. Now, it's evaluated as `!S.getLangOpts().OpenCLCPlusPlus && (...rest...)` -- that is, `!S.getLangOpts().OpenCLCPlusPlus` used to be anded with just one term and now it's anded with the whole thing.

Maybe it's worth to introduce some bool variables to make this less confusing instead of this one very long term?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105892



More information about the cfe-commits mailing list