[cfe-commits] improving constness on clang sources

David Blaikie dblaikie at gmail.com
Sun Nov 4 12:37:45 PST 2012


> created a constness checker, have run against clang source...

Just out of curiosity, what's the accuracy of this checker? Have you
managed to find good heuristics for not suggesting const on pimpl-like
idioms or other such things?

(my suspicion is that there's no good way to tell whether something
indirectly referenced (via a pointer) is notionally "part" of the
object or not, making it hard to have a low false positive on such a
tool - but if I'm wrong, this might be interesting to consider as a
compiler diagnostic)

> Here come a small set of fix on methods which are named 'is*' and return bool.

Changes generally look good. I'd be OK with someone (including me)
committing these, but might leave it a few days (if you don't hear
anything in a week, please ping this thread) to see if anyone else has
opinions (this might not meet some people's churn/benefit threshold).

Thanks,
- David



More information about the cfe-commits mailing list