On Tue, Apr 10, 2012 at 1:59 PM, Anna Zaks <[email protected]> wrote:
> Added: cfe/trunk/test/Analysis/dynamic-cast.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/dynamic-cast.cpp?rev=154434&view=auto
>
> ==============================================================================
> --- cfe/trunk/test/Analysis/dynamic-cast.cpp (added)
> +++ cfe/trunk/test/Analysis/dynamic-cast.cpp Tue Apr 10 15:59:00 2012
>
[...]
> +// False negatives.
> +
> +// Symbolic regions are not typed, so we cannot deduce that the cast will
> +// always fail in this case.
>
The cast won't always fail:
class D : public B, public C {};
int main() {
D d;
testDynCastFail1(&d);
}
+int testDynCastFail1(class C *c) {
> + B *b = 0;
> + b = dynamic_cast<B*>(c);
> + return b->m;
> +}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits