9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_EXPRMUTATIONANALYZER_H 10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_EXPRMUTATIONANALYZER_H 12 #include <type_traits> 14 #include "clang/AST/AST.h" 15 #include "clang/ASTMatchers/ASTMatchers.h" 16 #include "llvm/ADT/DenseMap.h" 27 : Stm(Stm), Context(Context) {}
29 bool isMutated(
const Decl *Dec) {
return findDeclMutation(Dec) !=
nullptr; }
34 bool isUnevaluated(
const Expr *Exp);
36 const Stmt *findExprMutation(ArrayRef<ast_matchers::BoundNodes> Matches);
37 const Stmt *findDeclMutation(ArrayRef<ast_matchers::BoundNodes> Matches);
38 const Stmt *findDeclMutation(
const Decl *Dec);
40 const Stmt *findDirectMutation(
const Expr *Exp);
41 const Stmt *findMemberMutation(
const Expr *Exp);
42 const Stmt *findArrayElementMutation(
const Expr *Exp);
43 const Stmt *findCastMutation(
const Expr *Exp);
44 const Stmt *findRangeLoopMutation(
const Expr *Exp);
45 const Stmt *findReferenceMutation(
const Expr *Exp);
47 const Stmt *
const Stm;
48 ASTContext *
const Context;
49 llvm::DenseMap<const Expr *, const Stmt *> Results;
56 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_EXPRMUTATIONANALYZER_H bool isMutated(const Decl *Dec)
ExprMutationAnalyzer(const Stmt *Stm, ASTContext *Context)
bool isMutated(const Expr *Exp)
const Stmt * findMutation(const Expr *Exp)
Analyzes whether any mutative operations are applied to an expression within a given statement...
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//