[PATCH] SemaLookup.cpp wrong boolean test

Yaron Keren yaron.keren at gmail.com
Tue Oct 1 11:25:48 PDT 2013

In SemaLookup.cpp, line 4102 the test is somewhat wrong, as count
(surprisingly given its name) return a boolean and not an integer.

      locs->second.count(TypoName.getLoc()) > 0)

A patch is attached.

I think this count function should be renamed to exists to better reflect
its function.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131001/5c3c5123/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: semalookup.diff
Type: application/octet-stream
Size: 603 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131001/5c3c5123/attachment.obj>

More information about the cfe-commits mailing list