[PATCH] D113795: Comment Sema: Eliminate or factor out DeclInfo inspection (NFC)
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 13 04:25:44 PST 2021
aaronpuchert added inline comments.
================
Comment at: clang/include/clang/AST/CommentSema.h:205
- /// \returns \c true if the declaration that this comment is attached to
- /// is a pointer to function/method/block type or has such a type.
- bool involvesFunctionType();
-
- bool isFunctionDecl();
- bool isAnyFunctionDecl();
-
- /// \returns \c true if declaration that this comment is attached to declares
- /// a function pointer.
- bool isFunctionPointerVarDecl();
- bool isFunctionOrMethodVariadic();
- bool isObjCMethodDecl();
- bool isObjCPropertyDecl();
- bool isTemplateOrSpecialization();
- bool isRecordLikeDecl();
- bool isClassOrStructDecl();
- /// \return \c true if the declaration that this comment is attached to
- /// declares either struct, class or tag typedef.
- bool isClassOrStructOrTagTypedefDecl();
- bool isUnionDecl();
- bool isObjCInterfaceDecl();
- bool isObjCProtocolDecl();
- bool isClassTemplateDecl();
- bool isFunctionTemplateDecl();
+ bool checkDecl(bool (*check)(const DeclInfo &));
----------------
Another idea for naming: `hasDeclThat`, then calls read like `hasDeclThat(isOfSomeKind)`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113795/new/
https://reviews.llvm.org/D113795
More information about the cfe-commits
mailing list