diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-02-25 14:40:42 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-02-25 14:40:42 +0000 |
| commit | 2344cbce571b60627653ec3015125737e5f8c68d (patch) | |
| tree | 978eae48e869bcf6e7f04f92efa77d9a1fd4a7b8 /test/Analysis/virtualcall.cpp | |
| parent | 47c4f8f1661f7cab0cf1ade9824cf0f5f1762403 (diff) | |
Notes
Diffstat (limited to 'test/Analysis/virtualcall.cpp')
| -rw-r--r-- | test/Analysis/virtualcall.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Analysis/virtualcall.cpp b/test/Analysis/virtualcall.cpp index e42b898a0738..311f0a137c6f 100644 --- a/test/Analysis/virtualcall.cpp +++ b/test/Analysis/virtualcall.cpp @@ -115,12 +115,23 @@ public: int foo() override; }; +// Regression test: don't crash when there's no direct callee. +class F { +public: + F() { + void (F::* ptr)() = &F::foo; + (this->*ptr)(); + } + void foo(); +}; + int main() { A *a; B *b; C *c; D *d; E *e; + F *f; } #include "virtualcall.h" |
