aboutsummaryrefslogtreecommitdiffstats
path: root/src/checks/level3/README-bogus-dynamic-cast.md
blob: 940c77c6b5f677c2eeab546bf69437101ad574d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# dynamic-cast

Finds places where a dynamic cast is redundant or when dynamic casting to base class, which is unneeded.
Optionally it can also find places where a qobject_cast should be used instead.

#### Example

    Foo *a = ...;
    Foo *b = dynamic_cast<Foo*>(a);


If you prefer to use qobject_cast instead of dynamic_cast you can catch those cases with:
`export CLAZY_EXTRA_OPTIONS="bogus-dynamic-cast-qobject`