Parenthesis were fixed incorrectly by D105890
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
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?
Note: https://reviews.llvm.org/D105890 that was just landed to touch the same area.
FWIW, I agree that this should probably be using some local variables to make the conditions a bit more clear.