[PATCH] D43248: [Attr] Fix parameter indexing for attributes
Joel E. Denny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 1 16:03:23 PST 2018
jdenny added inline comments.
================
Comment at: include/clang/AST/Attr.h:206
+
+ void cmpable(const ParamIdx &I) const {
+ assert(isValid() && I.isValid() &&
----------------
aaron.ballman wrote:
> jdenny wrote:
> > aaron.ballman wrote:
> > > The name here can be improved. How about `checkInvariants()`? Might as well make this inline while you're at it.
> > Sure, I can change the name.
> >
> > It's inside the class, so specifying inline is against the LLVM coding standards, right?
> Derp, you're correct, it's already implicitly inline. Ignore that part of the suggestion.
> The name here can be improved. How about checkInvariants()?
I went with assertComparable because, in my view, this is not so much a class invariant as it is an assertion about correct usage of comparison operators. But I'm not married to it.
https://reviews.llvm.org/D43248
More information about the cfe-commits
mailing list