diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-05-17 10:11:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-17 10:11:04 +0000 |
commit | 8cad07cfd2244ad9a40027a4306b81b4553a4797 (patch) | |
tree | ce267318444308626518420adf10b563c2bad96c /gcc/rust/resolve/rust-ast-resolve-base.h | |
parent | e4213b9568ae8cb8a4e31326e0e78c79db0a99cc (diff) | |
parent | 48fc2df91b07709f41ab80499a661ac9f12f3be3 (diff) | |
download | gcc-8cad07cfd2244ad9a40027a4306b81b4553a4797.zip gcc-8cad07cfd2244ad9a40027a4306b81b4553a4797.tar.gz gcc-8cad07cfd2244ad9a40027a4306b81b4553a4797.tar.bz2 |
Merge #1246
1246: Report simple privacy violations r=CohenArthur a=CohenArthur
This adds a base visitor for reporting basic privacy violations. For now, only function calls are implemented.
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-base.h')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve-base.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-base.h b/gcc/rust/resolve/rust-ast-resolve-base.h index 17d05c3..9c1f0a1 100644 --- a/gcc/rust/resolve/rust-ast-resolve-base.h +++ b/gcc/rust/resolve/rust-ast-resolve-base.h @@ -199,9 +199,10 @@ public: void visit (AST::BareFunctionType &); protected: - ResolverBase (NodeId parent) + ResolverBase (NodeId parent, NodeId current_module = UNKNOWN_NODEID) : resolver (Resolver::get ()), mappings (Analysis::Mappings::get ()), - resolved_node (UNKNOWN_NODEID), parent (parent), locus (Location ()) + resolved_node (UNKNOWN_NODEID), parent (parent), + current_module (current_module), locus (Location ()) {} bool resolved () const { return resolved_node != UNKNOWN_NODEID; } @@ -215,6 +216,7 @@ protected: Analysis::Mappings *mappings; NodeId resolved_node; NodeId parent; + NodeId current_module; Location locus; }; |