<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 7, 2012 at 10:37 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><div class="h5"><br>
On Tue, Aug 7, 2012 at 10:30 AM, Sam Panzer <<a href="mailto:panzer@google.com">panzer@google.com</a>> wrote:<br>
> Several places in the codebase determine if a method is const or volatile by<br>
> querying the method's type qualifiers directly, but it makes sense to<br>
> centralize the (simple) logic directly in CXXMethodDecl. It's particularly<br>
> useful for refactoring tools :)<br>
<br>
</div></div>Given that they're already members on CXXMethodDecl, the "Method" in<br>
the name seems a bit redundant (I'm not dead set on this, though - I<br>
appreciate that "isConst" might be a bit more unclear than the<br>
existing things like "isVirtual", etc) would "isConst" and<br>
"isVolatile" suffice?<br></blockquote><div> </div><div>I considered "isConst" and "isConstQualified" along with "isConstMethod" - mostly to distinguish between type qualifier const and method qualifier const. I don't think "isConst" is unclear so long as it is accessed from a well-named variable.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Also how do these methods fail if the method is a static member<br>
function? Would it be helpful to have an assert there to ensure these<br>
are only called on non-static member functions?<br></blockquote><div><br></div><div>Yes! Asserts added. </div></div><br></div>