summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/help/TestHelp.py
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-10-19 20:21:16 +0000
committerVedant Kumar <vsk@apple.com>2016-10-19 20:21:16 +0000
commit018f266bbcf9b825c9e176c0ca18068b731b7304 (patch)
treea55c24c9dda46e02a64dddb835bb01aab4d0ba7a /lldb/packages/Python/lldbsuite/test/help/TestHelp.py
parent2d55d67c62c759cb8678c6d59b2ee8ff875609c2 (diff)
downloadbcm5719-llvm-018f266bbcf9b825c9e176c0ca18068b731b7304.tar.gz
bcm5719-llvm-018f266bbcf9b825c9e176c0ca18068b731b7304.zip
[ubsan] Use the object pointer's type info for devirtualized calls
ubsan reports a false positive 'invalid member call' diagnostic on the following example (PR30478): struct Base1 { virtual int f1() { return 1; } }; struct Base2 { virtual int f1() { return 2; } }; struct Derived2 final : Base1, Base2 { int f1() override { return 3; } }; int t1() { Derived2 d; return static_cast<Base2 *>(&d)->f1(); } Adding the "final" attribute to a most-derived class allows clang to devirtualize member calls into an instance of that class. We should pass along the type info of the object pointer to avoid the FP. In this case, that means passing along the type info for 'Derived2' instead of 'Base2' when checking the dynamic type of static_cast<Base2 *>(&d2). Differential Revision: https://reviews.llvm.org/D25448 llvm-svn: 284636
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/help/TestHelp.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud