[cfe-dev] a patch for static analyzer to check : std::list::empty()
彩云追月
wuming_81 at 163.com
Sun Feb 1 15:26:33 PST 2015
Yes, it does the same thing as my checker does.
I found many postential checkers here :
http://clang-analyzer.llvm.org/potential_checkers.html
which checkers are those no body is implementing ?
At 2015-02-02 06:53:40, "David Blaikie" <dblaikie at gmail.com> wrote:
Looks like it might be a little like a recently contributed checker: http://llvm.org/viewvc/llvm-project?view=revision&revision=226172
On Sun, Feb 1, 2015 at 2:35 PM, 彩云追月 <wuming_81 at 163.com> wrote:
Hello,
recently, as an exercise, I have implemented a checker for clang static analyzer.It checks the call of std::list::size( ) .
It is more efficient to use containers empty() method to identify an empty container.Codes like bellow :
int f() {
list<int> l;
if (l.empty() == 0) {
}
}
will be warned.
btw, I did my dev on the release 3.5.
_______________________________________________
cfe-dev mailing list
cfe-dev at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150202/ab98f85c/attachment.html>
More information about the cfe-dev
mailing list