<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Feb 9, 2014, at 0:08 , David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><blockquote class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">[analyzer] Just silence all warnings coming out of std::basic_string.<br></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">This does seem like a rather rough heuristic - is there nothing better? (more general - everything in the STL? What about every other string class everyone and their monkey have written? And I assume this isn't about strings, as such, but just a complexity problem with complex types and string just happens to be a commonly used one?) </div></blockquote></div><div><br></div><div>I know...these are all arguments I've made to Anna in resisting these sorts of changes, and now I'm the one making them.</div><div><br></div><div>The particular problem with basic_string is in the short string / long string implementation; we've had repeated cases where the analyzer thinks there's a delete of stack memory or use-after-free. If we put more effort into union support (quite a bit, most likely), it would help a lot. (We may need better bitwise support as well.)</div><div><br></div><div>It's possible a better heuristic would be to squelch warnings coming from classes that looks like containers, but that doesn't help if you're <i>implementing</i> a container class.</div><div><br></div><div>But yes, this is an unfortunately reactionary change. I'm not happy with it either, but it seems better than false positives, and std::string variants have accounted for quite a few of the reported bugs in the analyzer's C++ support.</div><div><br></div><div>Jordan</div></body></html>