clang 20.0.0git
Public Types | Public Member Functions | Friends | List of all members
clang::DeclContext::specific_decl_iterator< SpecificDecl > Class Template Reference

specific_decl_iterator - Iterates over a subrange of declarations stored in a DeclContext, providing only those that are of type SpecificDecl (or a class derived from it). More...

#include "clang/AST/DeclBase.h"

Public Types

using value_type = SpecificDecl *
 
using reference = void
 
using pointer = void
 
using difference_type = std::iterator_traits< DeclContext::decl_iterator >::difference_type
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 specific_decl_iterator ()=default
 
 specific_decl_iterator (DeclContext::decl_iterator C)
 specific_decl_iterator - Construct a new iterator over a subset of the declarations the range [C, end-of-declarations).
 
value_type operator* () const
 
value_type operator-> () const
 
specific_decl_iteratoroperator++ ()
 
specific_decl_iterator operator++ (int)
 

Friends

bool operator== (const specific_decl_iterator &x, const specific_decl_iterator &y)
 
bool operator!= (const specific_decl_iterator &x, const specific_decl_iterator &y)
 

Detailed Description

template<typename SpecificDecl>
class clang::DeclContext::specific_decl_iterator< SpecificDecl >

specific_decl_iterator - Iterates over a subrange of declarations stored in a DeclContext, providing only those that are of type SpecificDecl (or a class derived from it).

This iterator is used, for example, to provide iteration over just the fields within a RecordDecl (with SpecificDecl = FieldDecl).

Examples
/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp.

Definition at line 2369 of file DeclBase.h.

Member Typedef Documentation

◆ difference_type

template<typename SpecificDecl >
using clang::DeclContext::specific_decl_iterator< SpecificDecl >::difference_type = std::iterator_traits<DeclContext::decl_iterator>::difference_type

Definition at line 2389 of file DeclBase.h.

◆ iterator_category

template<typename SpecificDecl >
using clang::DeclContext::specific_decl_iterator< SpecificDecl >::iterator_category = std::forward_iterator_tag

Definition at line 2391 of file DeclBase.h.

◆ pointer

template<typename SpecificDecl >
using clang::DeclContext::specific_decl_iterator< SpecificDecl >::pointer = void

Definition at line 2388 of file DeclBase.h.

◆ reference

template<typename SpecificDecl >
using clang::DeclContext::specific_decl_iterator< SpecificDecl >::reference = void

Definition at line 2387 of file DeclBase.h.

◆ value_type

template<typename SpecificDecl >
using clang::DeclContext::specific_decl_iterator< SpecificDecl >::value_type = SpecificDecl *

Definition at line 2384 of file DeclBase.h.

Constructor & Destructor Documentation

◆ specific_decl_iterator() [1/2]

template<typename SpecificDecl >
clang::DeclContext::specific_decl_iterator< SpecificDecl >::specific_decl_iterator ( )
default

◆ specific_decl_iterator() [2/2]

template<typename SpecificDecl >
clang::DeclContext::specific_decl_iterator< SpecificDecl >::specific_decl_iterator ( DeclContext::decl_iterator  C)
inlineexplicit

specific_decl_iterator - Construct a new iterator over a subset of the declarations the range [C, end-of-declarations).

If A is non-NULL, it is a pointer to a member function of SpecificDecl that should return true for all of the SpecificDecl instances that will be in the subset of iterators. For example, if you want Objective-C instance methods, SpecificDecl will be ObjCMethodDecl and A will be &ObjCMethodDecl::isInstanceMethod.

Definition at line 2403 of file DeclBase.h.

Member Function Documentation

◆ operator*()

template<typename SpecificDecl >
value_type clang::DeclContext::specific_decl_iterator< SpecificDecl >::operator* ( ) const
inline

Definition at line 2407 of file DeclBase.h.

◆ operator++() [1/2]

template<typename SpecificDecl >
specific_decl_iterator & clang::DeclContext::specific_decl_iterator< SpecificDecl >::operator++ ( )
inline

Definition at line 2412 of file DeclBase.h.

◆ operator++() [2/2]

template<typename SpecificDecl >
specific_decl_iterator clang::DeclContext::specific_decl_iterator< SpecificDecl >::operator++ ( int  )
inline

Definition at line 2418 of file DeclBase.h.

◆ operator->()

template<typename SpecificDecl >
value_type clang::DeclContext::specific_decl_iterator< SpecificDecl >::operator-> ( ) const
inline

Definition at line 2410 of file DeclBase.h.

Friends And Related Function Documentation

◆ operator!=

template<typename SpecificDecl >
bool operator!= ( const specific_decl_iterator< SpecificDecl > &  x,
const specific_decl_iterator< SpecificDecl > &  y 
)
friend

Definition at line 2429 of file DeclBase.h.

◆ operator==

template<typename SpecificDecl >
bool operator== ( const specific_decl_iterator< SpecificDecl > &  x,
const specific_decl_iterator< SpecificDecl > &  y 
)
friend

Definition at line 2424 of file DeclBase.h.


The documentation for this class was generated from the following file: