clang 20.0.0git
Public Member Functions | List of all members
clang::tooling::OptionRequirement< OptionType > Class Template Reference

A requirement that evaluates to the value of the given OptionType when the OptionType is a required option. More...

#include "clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h"

Inheritance diagram for clang::tooling::OptionRequirement< OptionType >:
Inheritance graph
[legend]

Public Member Functions

 OptionRequirement ()
 
ArrayRef< std::shared_ptr< RefactoringOption > > getRefactoringOptions () const final
 Returns the set of refactoring options that are used when evaluating this requirement.
 
Expected< typename OptionType::ValueType > evaluate (RefactoringRuleContext &) const
 
- Public Member Functions inherited from clang::tooling::RefactoringOptionsRequirement
virtual ~RefactoringOptionsRequirement ()
 
virtual ArrayRef< std::shared_ptr< RefactoringOption > > getRefactoringOptions () const =0
 Returns the set of refactoring options that are used when evaluating this requirement.
 

Detailed Description

template<typename OptionType>
class clang::tooling::OptionRequirement< OptionType >

A requirement that evaluates to the value of the given OptionType when the OptionType is a required option.

When the OptionType is an optional option, the requirement will evaluate to None if the option is not specified or to an appropriate value otherwise.

Definition at line 96 of file RefactoringActionRuleRequirements.h.

Constructor & Destructor Documentation

◆ OptionRequirement()

template<typename OptionType >
clang::tooling::OptionRequirement< OptionType >::OptionRequirement ( )
inline

Definition at line 98 of file RefactoringActionRuleRequirements.h.

Member Function Documentation

◆ evaluate()

template<typename OptionType >
Expected< typename OptionType::ValueType > clang::tooling::OptionRequirement< OptionType >::evaluate ( RefactoringRuleContext ) const
inline

Definition at line 106 of file RefactoringActionRuleRequirements.h.

◆ getRefactoringOptions()

template<typename OptionType >
ArrayRef< std::shared_ptr< RefactoringOption > > clang::tooling::OptionRequirement< OptionType >::getRefactoringOptions ( ) const
inlinefinalvirtual

Returns the set of refactoring options that are used when evaluating this requirement.

Implements clang::tooling::RefactoringOptionsRequirement.

Definition at line 101 of file RefactoringActionRuleRequirements.h.


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