[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

wangxin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 20 06:00:44 PDT 2017


wangxindsb added a comment.

> What about:
> 
>   struct A {
>     A() {
>       X x;
>       x.virtualMethod(); // this virtual call is ok
>       foo(); // should warn here
>     }
>     virtual foo();
>   }
>   int main() {
>     A a;
>   }
> 
> 
> Does the checker warn on the second call?

Yes, the checker warn on the second call.


https://reviews.llvm.org/D34275





More information about the cfe-commits mailing list