clang 20.0.0git
Public Member Functions | Public Attributes | List of all members
clang::VariablePattern::SuspiciousClonePair::SuspiciousCloneInfo Struct Reference

Utility class holding the relevant information about a single clone in this pair. More...

#include "clang/Analysis/CloneDetection.h"

Public Member Functions

 SuspiciousCloneInfo (const VarDecl *Variable, const Stmt *Mention, const VarDecl *Suggestion)
 
 SuspiciousCloneInfo ()
 

Public Attributes

const VarDeclVariable
 The variable which referencing in this clone was against the pattern.
 
const StmtMention
 Where the variable was referenced.
 
const VarDeclSuggestion
 The variable that should have been referenced to follow the pattern.
 

Detailed Description

Utility class holding the relevant information about a single clone in this pair.

Definition at line 383 of file CloneDetection.h.

Constructor & Destructor Documentation

◆ SuspiciousCloneInfo() [1/2]

clang::VariablePattern::SuspiciousClonePair::SuspiciousCloneInfo::SuspiciousCloneInfo ( const VarDecl Variable,
const Stmt Mention,
const VarDecl Suggestion 
)
inline

Definition at line 392 of file CloneDetection.h.

◆ SuspiciousCloneInfo() [2/2]

clang::VariablePattern::SuspiciousClonePair::SuspiciousCloneInfo::SuspiciousCloneInfo ( )
inline

Definition at line 395 of file CloneDetection.h.

Member Data Documentation

◆ Mention

const Stmt* clang::VariablePattern::SuspiciousClonePair::SuspiciousCloneInfo::Mention

Where the variable was referenced.

Definition at line 387 of file CloneDetection.h.

◆ Suggestion

const VarDecl* clang::VariablePattern::SuspiciousClonePair::SuspiciousCloneInfo::Suggestion

The variable that should have been referenced to follow the pattern.

If Suggestion is a nullptr then it's not possible to fix the pattern by referencing a different variable in this clone.

Definition at line 391 of file CloneDetection.h.

Referenced by clang::VariablePattern::countPatternDifferences().

◆ Variable

const VarDecl* clang::VariablePattern::SuspiciousClonePair::SuspiciousCloneInfo::Variable

The variable which referencing in this clone was against the pattern.

Definition at line 385 of file CloneDetection.h.


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