r282411 - [analyzer] Improve CastToStruct checker so it can also detect widening casts of struct data

Abramo Bagnara via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 27 09:11:29 PST 2016


Il 26/09/2016 17:17, Daniel Marjamaki via cfe-commits ha scritto:
> Author: danielmarjamaki
> Date: Mon Sep 26 10:17:18 2016
> New Revision: 282411
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=282411&view=rev
> Log:
> [analyzer] Improve CastToStruct checker so it can also detect widening casts of struct data
> 
> Example:
> 
> struct AB {
>   int A;
>   int B;
> };
> 
> struct ABC {
>   int A;
>   int B;
>   int C;
> };
> 
> void f() {
>   struct AB Data;
>   struct ABC *P = (struct ABC *)&Data;
> }
> 

This commit introduces the regression filed in

https://llvm.org/bugs/show_bug.cgi?id=31173

-- 
Abramo Bagnara

BUGSENG srl - http://bugseng.com
mailto:abramo.bagnara at bugseng.com


More information about the cfe-commits mailing list