about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2021-03-21 00:17:19 -0400
committerAaron Hill <aa1ronham@gmail.com>2021-03-21 00:41:12 -0400
commit6d7294a00c3f831ed7d60a530911bff67f4e54ba (patch)
tree4ab5bd0b59be4d3b716b2d1feddfbef390b54fcb /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent61edfd591cedff66fca639c02f66984f6271e5a6 (diff)
downloadrust-6d7294a00c3f831ed7d60a530911bff67f4e54ba.tar.gz
rust-6d7294a00c3f831ed7d60a530911bff67f4e54ba.zip
Perform 'deep recollection' in test helper macros
Currently, the print helper macro performs 'recollection' by doing
`token_stream.into_iter().collect()`. However, this will not affect
nonterminals that occur nested inside delimited groups, since the
wrapping delimited group will be left untouched.

This commit adds 'deep recollection', which recursively recollects every
delimited group in the token stream. As with normal recollection, we
only print out something if deep recollection results in a different
stringified token stream.

This is useful for catching bugs where we update the AST of a
nonterminal (which affects pretty-printing), but do not update the
attatched `TokenStream`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions