clang API Documentation

Functions
IdenticalExprChecker.cpp File Reference

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

#include "ClangSACheckers.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.

Functions

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.

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

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