clang 10.0.0git

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

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

Collaboration diagram for clang::diff::ComparisonOptions:
[legend]

## Public Member Functions
bool | isMatchingAllowed (const Node &N1, const Node &N2) const
| Returns false if the nodes should never be matched. More...

## Public Attributes
int | MinHeight = 2
| During top-down matching, only consider nodes of at least this height. More...
double | MinSimilarity = 0.5
| During bottom-up matching, match only nodes with at least this value as the ratio of their common descendants. More...
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. More...
bool | StopAfterTopDown = false

## Detailed Description

Definition at line 103 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 118 of file ASTDiff.h.

References clang::diff::Node::getType(), and clang::ast_type_traits::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 113 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 105 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 109 of file ASTDiff.h.

## ◆ StopAfterTopDown

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

Definition at line 115 of file ASTDiff.h.

Referenced by clang::diff::ASTDiff::Impl::computeMapping().

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

- include/clang/Tooling/ASTDiff/ASTDiff.h