clang  6.0.0svn
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:
Collaboration graph
[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 104 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 119 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 114 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 106 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 110 of file ASTDiff.h.

◆ StopAfterTopDown

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

Definition at line 116 of file ASTDiff.h.

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


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