[PATCH] D55790: [AST] Add accessSpecs() iterator range for CXXRecordDecl
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 18 05:14:14 PST 2018
aaron.ballman added a comment.
In D55790#1333664 <https://reviews.llvm.org/D55790#1333664>, @m4tx wrote:
> In D55790#1333627 <https://reviews.llvm.org/D55790#1333627>, @riccibruno wrote:
>
> > Do you really have to add an iterator for this particular thing ?
> > Why not just use `specific_decl_iterator<AccessSpecDecl>` in your clang-tidy checker ?
>
>
> I don't need to - if this is the preferred way to accomplish this, I'm more than happy to modify the revisions. I just saw other range methods that are only used once (e.g. `CXXRecordDecl::friends()`).
I think this has utility because it exposes a range accessor, but it's up to you which way you'd like to go. I left some comments in case you decide to pick this patch back up again.
================
Comment at: include/clang/AST/DeclCXX.h:855
+ /// Iterator access to member access specifiers.
+ using accessspec_iterator = specific_decl_iterator<AccessSpecDecl>;
+ using accessspec_range =
----------------
I'd prefer `access_spec` to `accessspec` (here and elsewhere).
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55790/new/
https://reviews.llvm.org/D55790
More information about the cfe-commits
mailing list