[cfe-dev] constness fixes

Laszlo Nagy rizsotto.mailinglist at gmail.com
Mon Oct 29 04:11:22 PDT 2012


Hi,

created a constness checker, have run against clang source. It dumps a
huge amount of methods which are const (or static) candidates. Take
into consideration that it produces false positives, it is still too
many. Just to picture the status, here are some numbers:

 - functions, name 'is*', which can be declared const in clang source: ~100
 - functions, name 'get*', which can be declared const in clang source: ~350
 - functions, name 'emit*', which can be declared const in clang source: ~250
 - total number of methods which can be declared const in clang source: ~3700
 - total number of methods which can be declared static in clang source: ~400

 - functions, name 'is*', which can be declared const in llvm source: ~150
 - functions, name 'get*', which can be declared const in llvm source: ~550
 - total number of methods which can be declared const in llvm source: ~1600
 - total number of methods which can be declared static in llvm source: ~600

Would you be interested to receive patches to fix them? And which form
would you like to get them?

Regards,
Laszlo



More information about the cfe-dev mailing list