1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
15 struct ClassB
: public ClassA
22 // expected-note@+1 {{static_cast here [loplugin:staticdynamic]}}
23 static_cast<ClassB
*>(p1
)->foo();
24 // expected-error@+1 {{dynamic_cast after static_cast [loplugin:staticdynamic]}}
25 dynamic_cast<ClassB
*>(p1
)->foo();
30 // expected-note@+1 {{dynamic_cast here [loplugin:staticdynamic]}}
31 dynamic_cast<ClassB
*>(p1
)->foo();
32 // expected-error@+1 {{static_cast after dynamic_cast [loplugin:staticdynamic]}}
33 static_cast<ClassB
*>(p1
)->foo();
38 // expected-note@+1 {{dynamic_cast here [loplugin:staticdynamic]}}
39 dynamic_cast<const ClassB
*>(p1
)->foo();
40 // expected-error@+1 {{static_cast after dynamic_cast [loplugin:staticdynamic]}}
41 static_cast<ClassB
*>(p1
)->foo();
44 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */