clang  17.0.0git
IdenticalExprChecker.cpp File Reference
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
Include dependency graph for IdenticalExprChecker.cpp:

Go to the source code of this file.


static bool isIdenticalStmt (const ASTContext &Ctx, const Stmt *Stmt1, const Stmt *Stmt2, bool IgnoreSideEffects)
 Determines whether two statement trees are identical regarding operators and symbols. More...

Detailed Description

This defines IdenticalExprChecker, a check that warns about unintended use of identical expressions.

It checks for use of identical expressions with comparison operators and inside conditional expressions.

Definition in file IdenticalExprChecker.cpp.

Function Documentation

◆ isIdenticalStmt()

static bool isIdenticalStmt ( const ASTContext Ctx,
const Stmt Stmt1,
const Stmt Stmt2,
bool  IgnoreSideEffects