summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-02-11 19:26:27 +0000
committerSanjay Patel <spatel@rotateright.com>2019-02-11 19:26:27 +0000
commit587fd849f05bec7a8d4673262a884892444387d5 (patch)
tree1e9f3a7210fd4e5cfda35a075b6f2d41685560c2 /clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
parent4892f06e06cc5c987dfb77bfe13a91e1b1b00524 (diff)
downloadbcm5719-llvm-587fd849f05bec7a8d4673262a884892444387d5.tar.gz
bcm5719-llvm-587fd849f05bec7a8d4673262a884892444387d5.zip
[InstCombine] Fix matchRotate bug when one operand is a ConstantExpr shift
This bug seems to be harmless in release builds, but will cause an error in UBSAN builds or an assertion failure in debug builds. When it gets to this opcode comparison, it assumes both of the operands are BinaryOperators, but the prior m_LogicalShift will also match a ConstantExpr. The cast<BinaryOperator> will assert in a debug build, or reading an invalid value for BinaryOp from memory with ((BinaryOperator*)constantExpr)->getOpcode() will cause an error in a UBSAN build. The test I added will fail without this change in debug/UBSAN builds, but not in release. Patch by: @AndrewScheidecker (Andrew Scheidecker) Differential Revision: https://reviews.llvm.org/D58049 llvm-svn: 353736
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud