hokein added inline comments.

Comment at: include/clang/ASTMatchers/ASTMatchers.h:3005
+/// \endcode
+AST_MATCHER(VarDecl, isStaticDataMember) {
+  return Node.isStaticDataMember();
aaron.ballman wrote:
> How does this differ from the existing matcher `hasStaticStorageDuration()` 
> over a `fieldDecl()`?
`fieldDecl` document says that fieldDecl is "an instance of this class is 
created by Sema::ActOnField to
represent a member of a struct/union/class.". So for static class members, they 
should not belong to `fieldDecl` as they are not bound to class instances.
Technically, we can't apply `hasStaticStorageDuration()` and 
`isStaticStorageClass` over a `fieldDecl`.


cfe-commits mailing list

Reply via email to