[PATCH] [analyzer][Review request] Better modelling of memcpy by the CStringChecker (PR16731)

Anna Zaks zaks.anna at gmail.com
Mon Oct 28 14:02:15 PDT 2013


  Anton,

  If possible, I'd rather have traits specify what needs to be invalidated rather than what should not be invalidated/escaped. This way it would be more clear what we are invalidating. For example, the invalidation of subregions is not explicitly mentioned anywhere. Also, we have a situation where we might call ConstPointerEscape with TK_SuppressEscape and !TK_PreserveContents... what would that do? I feel like the API is not very clean/user friendly.

  Maybe we should have a single user-level callback which could be used by a user to specify what needs to be escaped and/or invalidated explicitly (we can have good defaults to simplify this in the common case). Or we could possibly split invalidation and escape into 2 callbacks.

  What do you think about this API approach? Do you think it would be cleaner and doable?

http://llvm-reviews.chandlerc.com/D1887



More information about the cfe-commits mailing list