clang-tools
11.0.0
|
#include "BranchCloneCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Analysis/CloneDetection.h"
#include "clang/Lex/Lexer.h"
#include "llvm/Support/Casting.h"
Go to the source code of this file.
Namespaces | |
clang | |
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===// | |
clang::tidy | |
clang::tidy::bugprone | |
Functions | |
static bool | areStatementsIdentical (const Stmt *LHS, const Stmt *RHS, const ASTContext &Context) |
Returns true when the statements are Type I clones of each other. More... | |
static bool | areSwitchBranchesIdentical (const SwitchBranch LHS, const SwitchBranch RHS, const ASTContext &Context) |
Determines if the bodies of two branches in a switch statements are Type I clones of each other. More... | |
|
static |
Returns true when the statements are Type I clones of each other.
Definition at line 21 of file BranchCloneCheck.cpp.
|
static |
Determines if the bodies of two branches in a switch statements are Type I clones of each other.
This function only examines the body of the branch and ignores the case X:
or default:
at the start of the branch.
Definition at line 38 of file BranchCloneCheck.cpp.