[PATCH] New warning when using memset etc on std class data

Daniel Marjamäki Daniel.Marjamaki at evidente.se
Wed Nov 13 15:27:15 PST 2013


Hello!

I'd like to get comments / reviews for this patch.

clang currently writes warnings if memset is used on a class that contains virtual methods.

This patch adds warnings when memset is used on a class that contains std class members. This can cause weird bugs.

I have seen such bugs in a closed source project. And there was also a major cleanup of such bugs a few years ago in boinc.

Best regards,
Daniel Marjamäki

..................................................................................................................
Daniel Marjamäki
Senior Engineer
Evidente ES East AB 
Warfvinges väg 34  SE-112 51 Stockholm  Sweden 

 
Mobile:                
+46 (0)709 12 42 62
E-mail:   
             
Daniel.Marjamaki at evidente.se     
                 
 
www.evidente.se







-------------- next part --------------
A non-text attachment was scrubbed...
Name: 131114-2.diff
Type: text/x-patch
Size: 3138 bytes
Desc: 131114-2.diff
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131113/17e648f2/attachment.bin>


More information about the cfe-commits mailing list