[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 04:15:43 PDT 2017

wangxindsb added a comment.

> I do not see any test cases for this patch. Could you add them as well?

I add the test case just now.

> How do you handle the following case?
>   struct A {
>     A() {
>       X x;
>       x.virtualMethod(); // this virtual call is ok
>     }
>   }
>   int main() {
>     A a;
>   }

I use the checker to check the code above, the checker works as expect and doesn't throw the warning.


More information about the cfe-commits mailing list