summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2019-10-19 01:47:49 +0000
committerRichard Trieu <rtrieu@google.com>2019-10-19 01:47:49 +0000
commit637af4cc37802a25564aa96c4d4eb3facbcff9b8 (patch)
treeceba66728354439c370223cb832b21ab537cfbc7 /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
parent7bbe711fb1b9057e48dec3c15b084eee7f8ff5fb (diff)
downloadbcm5719-llvm-637af4cc37802a25564aa96c4d4eb3facbcff9b8.tar.gz
bcm5719-llvm-637af4cc37802a25564aa96c4d4eb3facbcff9b8.zip
Add -Wbitwise-conditional-parentheses to warn on mixing '|' and '&' with "?:"
Extend -Wparentheses to cover mixing bitwise-and and bitwise-or with the conditional operator. There's two main cases seen with this: unsigned bits1 = 0xf0 | cond ? 0x4 : 0x1; unsigned bits2 = cond1 ? 0xf0 : 0x10 | cond2 ? 0x5 : 0x2; // Intended order of evaluation: unsigned bits1 = 0xf0 | (cond ? 0x4 : 0x1); unsigned bits2 = (cond1 ? 0xf0 : 0x10) | (cond2 ? 0x5 : 0x2); // Actual order of evaluation: unsigned bits1 = (0xf0 | cond) ? 0x4 : 0x1; unsigned bits2 = cond1 ? 0xf0 : ((0x10 | cond2) ? 0x5 : 0x2); Differential Revision: https://reviews.llvm.org/D66043 llvm-svn: 375326
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud