clang 20.0.0git
Public Member Functions | Public Attributes | List of all members
clang::diff::ComparisonOptions Struct Reference

#include "clang/Tooling/ASTDiff/ASTDiff.h"

Public Member Functions

bool isMatchingAllowed (const Node &N1, const Node &N2) const
 Returns false if the nodes should never be matched.
 

Public Attributes

int MinHeight = 2
 During top-down matching, only consider nodes of at least this height.
 
double MinSimilarity = 0.5
 During bottom-up matching, match only nodes with at least this value as the ratio of their common descendants.
 
int MaxSize = 100
 Whenever two subtrees are matched in the bottom-up phase, the optimal mapping is computed, unless the size of either subtrees exceeds this.
 
bool StopAfterTopDown = false
 

Detailed Description

Definition at line 90 of file ASTDiff.h.

Member Function Documentation

◆ isMatchingAllowed()

bool clang::diff::ComparisonOptions::isMatchingAllowed ( const Node N1,
const Node N2 
) const
inline

Returns false if the nodes should never be matched.

Definition at line 105 of file ASTDiff.h.

References clang::diff::Node::getType(), and clang::ASTNodeKind::isSame().

Member Data Documentation

◆ MaxSize

int clang::diff::ComparisonOptions::MaxSize = 100

Whenever two subtrees are matched in the bottom-up phase, the optimal mapping is computed, unless the size of either subtrees exceeds this.

Definition at line 100 of file ASTDiff.h.

◆ MinHeight

int clang::diff::ComparisonOptions::MinHeight = 2

During top-down matching, only consider nodes of at least this height.

Definition at line 92 of file ASTDiff.h.

◆ MinSimilarity

double clang::diff::ComparisonOptions::MinSimilarity = 0.5

During bottom-up matching, match only nodes with at least this value as the ratio of their common descendants.

Definition at line 96 of file ASTDiff.h.

◆ StopAfterTopDown

bool clang::diff::ComparisonOptions::StopAfterTopDown = false

Definition at line 102 of file ASTDiff.h.


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