kmp_affinity: Fix check if specific bit is set

Clang 4.0 trunk warns:
warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]

This points to a potential bug if the code really wants to check if the single
bit is not set: If for example (buf.edx >> 9) = 2 (has any bit set except the
least significant one), 'logical not' will return 0 which stays 0 after the
'bitwise and'.
To do this correctly we first need to evaluate the 'bitwise and'. In that case
it returns 2 & 1 = 0 which after the 'logical not' evaluates to 1.

Differential Revision: https://reviews.llvm.org/D28599

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@291764 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed
tree: 034986324a06e186e7400116c63bc476e7d8264d
  1. offload/
  2. runtime/
  3. testsuite/
  4. www/
  5. CMakeLists.txt
  6. CREDITS.txt
  7. LICENSE.txt