Cleanup macro invoc
MacroInvoc Refactor for #2919
Remove get_macro_node_id in favor of get_node_id in MacroInvocation
Add ExteralItem node_id constructor to avoid extra get_node_id()
gcc/rust/ChangeLog:
* ast/rust-macro.h: Likewise.
* resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise.
* util/rust-hir-map.cc (Mappings::insert_macro_invocation): Likewise.
(Mappings::lookup_macro_invocation): Likewise.
(Mappings::insert_bang_proc_macro_invocation): Likewise.
ok i appear to have developed this from another branch other than master, fixing it rn
@CohenArthur hi Arthur i'm not sure for things like node_id and locus, if you want to not explicitly declare them in MacroInvocation and just get_node_id and get_locus from the parent's class or if you just want to do them explicitly like what I've kept in the modification?
Also not sure what else needs to be clean up for this class..
I don't get your changelog message:
* ast/rust-macro.h: Likewise.
* resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise.
* util/rust-hir-map.cc (Mappings::insert_macro_invocation): Likewise.
(Mappings::lookup_macro_invocation): Likewise.
(Mappings::insert_bang_proc_macro_invocation): Likewise.
There is nothing to be like, how could the first statement be likewise ? In case you meant "Like stated in the commit message" I would suggest duplicating the message because IIRC changelog may be cut from the commit message to be put in the changelog file.
I don't get your changelog message:
* ast/rust-macro.h: Likewise. * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise. * util/rust-hir-map.cc (Mappings::insert_macro_invocation): Likewise. (Mappings::lookup_macro_invocation): Likewise. (Mappings::insert_bang_proc_macro_invocation): Likewise.There is nothing to be like, how could the first statement be
likewise? In case you meant "Like stated in the commit message" I would suggest duplicating the message because IIRC changelog may be cut from the commit message to be put in the changelog file.
Purely an oversight from my end. I'll update it once the PR needs work again.