8#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_EXPRMUTATIONANALYZER_H
9#define LLVM_CLANG_ANALYSIS_ANALYSES_EXPRMUTATIONANALYZER_H
15#include "llvm/ADT/DenseMap.h"
19class FunctionParmMutationAnalyzer;
26 : Stm(Stm), Context(Context) {}
46 using ResultMap = llvm::DenseMap<const Expr *, const Stmt *>;
48 const Stmt *findMutationMemoized(
const Expr *Exp,
50 ResultMap &MemoizedResults);
51 const Stmt *tryEachDeclRef(
const Decl *Dec, MutationFinder Finder);
62 const Stmt *findDirectMutation(
const Expr *Exp);
63 const Stmt *findMemberMutation(
const Expr *Exp);
64 const Stmt *findArrayElementMutation(
const Expr *Exp);
65 const Stmt *findCastMutation(
const Expr *Exp);
66 const Stmt *findRangeLoopMutation(
const Expr *Exp);
67 const Stmt *findReferenceMutation(
const Expr *Exp);
68 const Stmt *findFunctionArgMutation(
const Expr *Exp);
73 std::unique_ptr<FunctionParmMutationAnalyzer>>
76 ResultMap PointeeResults;
92 llvm::DenseMap<const ParmVarDecl *, const Stmt *> Results;
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Decl - This represents one declaration (or definition), e.g.
Analyzes whether any mutative operations are applied to an expression within a given statement.
const Stmt * findMutation(const Expr *Exp)
bool isMutated(const Decl *Dec)
bool isPointeeMutated(const Expr *Exp)
const Stmt * findPointeeMutation(const Expr *Exp)
bool isMutated(const Expr *Exp)
ExprMutationAnalyzer(const Stmt &Stm, ASTContext &Context)
bool isPointeeMutated(const Decl *Dec)
static bool isUnevaluated(const Stmt *Smt, const Stmt &Stm, ASTContext &Context)
This represents one expression.
Represents a function declaration or definition.
bool isMutated(const ParmVarDecl *Parm)
const Stmt * findMutation(const ParmVarDecl *Parm)
Represents a parameter to a function.
Stmt - This represents one statement.