clang-metatool
A framework for reusing code in clang tools
|
#include <clangmetatool/collectors/variable_refs_data.h>
Public Attributes | |
std::multimap< const clang::VarDecl *, const clang::DeclRefExpr * > | refs |
std::set< const clang::DeclRefExpr * > | rvalue_refs |
std::map< const clang::DeclRefExpr *, const clang::Expr * > | clear_assignment_refs |
The data collected by the VariableRefs collector
Definition at line 28 of file variable_refs_data.h.
std::map<const clang::DeclRefExpr *, const clang::Expr *> clangmetatool::collectors::VariableRefsData::clear_assignment_refs |
List usages of that variable that are plain variable assignment. The idea is that if the variable is never initialized, and the only non-rvalue usage is a clear assignment, then its value is deterministic.
More elaborate execution-path analysis would be able to tell this better, but there are situations where this will be sufficient.
Definition at line 53 of file variable_refs_data.h.
std::multimap<const clang::VarDecl *, const clang::DeclRefExpr *> clangmetatool::collectors::VariableRefsData::refs |
List all the references for that valuedecl.
Definition at line 33 of file variable_refs_data.h.
std::set<const clang::DeclRefExpr *> clangmetatool::collectors::VariableRefsData::rvalue_refs |
List usages of that variable as rvalue. You may actually be interested in the usages that are not rvalues, but the way the collector works requires us to do this indirection.
Definition at line 40 of file variable_refs_data.h.