6.2.6.2. C++CloneDetection¶
Find clones in C and C++ files
Possible Messages
This rule has no predefined messages.
Options¶
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, post_processing, provider, report_at, severity
The following places define options that affect this rule: CloneDetections, Analysis-GlobalOptions
advanced¶
Options that are normally not required
advanced.bucket_cutoff : int =
Ignore buckets larger than the cutoff size.2000
advanced.exclude_classes
Physical IR classes that are to be excluded from the hash buckets for later subtree comparison, even if e.g. a parent class has been included for subtree comparison.Type: set[bauhaus.ir.PIR_Class_Name]
Default:
{'Aggregate_Literal', 'Attributed_Definition', 'Enumerator_Definition', 'Field_Definition', 'Global_Variable_Definition', 'Include_Interface', 'Preprocessor', 'Routine_Declaration', 'Type_Declaration', 'Type_Definition', 'Variable_Declaration'}
advanced.file_contents_cutoff : int =
Ignore file that are present in more versions than the cutoff size.10
advanced.gxl_file : bauhaus.analysis.config.LayerRelativePath | None =
Output found clones as GXL file.None
advanced.include_classes : set[bauhaus.ir.PIR_Class_Name] =
Physical IR classes that are to be included in the hash buckets for later subtree comparison.{'Physical_IR_Root'}
advanced.pre_min_lines : int =
Minimum length in lines during hashing phase.2
advanced.pre_min_weight : int =
Minimum weight in nodes during hashing phase.2
advanced.stats_file : bauhaus.analysis.config.LayerRelativePath | None =
Output statistics of found clones as CSV file.None
exclude_predicate¶
exclude_predicate : typing.Callable[[_irclones.Clone_Pair], bool] | None = None
max_density¶
max_density : int = 2147483647
min_density¶
min_density : int = 0
min_lines¶
min_lines : int = 30
min_weight¶
min_weight : int = 30
no_sequences¶
no_sequences : bool = False
pre_excludes¶
pre_excludes : set[bauhaus.analysis.config.GlobPattern] = set()
*/MemMap.h).
type3_similarity¶
type3_similarity : int = 80