TL;DR: Voicelines are not literally canon, they represent canon.
I keep seeing people drop in a “Voicelines are not canon” and leaving it at that, dismissing them entirely. This isn’t really the case. Voicelines indicate what a character would say if they were in a given situation, but do not indicate that that situation has ever happened, or that they two characters have ever met and learned eachother’s identities. Here is a quote from Michael Chu on the old forums.
(To make it extra confusing: it gets a little more complicated in-game because we chose to have some non-canon interactions because I think it’s more interesting to have Reinhardt take out Reaper and say, “Traitor!” than to accurately reflect that he doesn’t know Reaper’s true identity. But as I’ve said before, events in game shouldn’t be considered strictly canon.)
In game, we have interactions like Lucio and Tracer teaming up, but that never happened. They never met. This interaction indicates that if they did meet, they would get along great, and if they did team up they would be upbeat and cheerful speed freaks.
We also have interactions between Lucio and Symmetra, which give us most of the story we do not know about what happened in Brazil… But as far as we know, the two have never met. This does not discredit the voicelines, as they are impersonal and dive more into the tensions between Lucio and Vishkar, the favelas and Vishkar, Symmetra and Vishkar, Lucio’s dad and Vishkar, etc. They provide a lot of important information and backstory about Vishkar and their prospects… But all of this backstory should not be discredited because Symmetra and Lucio have never met to say all of this to each other.
Another popular example is the interactions between McCree and Pharah. When Pharah shoots McCree, she says “Got you this time Jesse”, and in one of their pregame interactions, they discuss that they are no longer playing with toy guns. These lines tell us more about the history and events that these two used to get up to in the past, telling us that McCree and Pharah, when they were younger, would be using toy guns either to play or to train. They may not be teamed up in the present, but the past revealed by this interaction does tell us what they used to do.
On a similar note with McCree and Pharah, their other pregame interaction discusses how McCree learned to shoot so well, guessing it to be Jack or Gabriel. Instead, he reveals that he learned from the best; her mother. Again, the two haven’t exactly reunited in the present, but this dialogue does tell us more about Jesse’s past, as well as furthering Pharah’s admiration for her childhood heroes.
Overall, it is a bit tricky to try and sift out the details of what is to be learned without making inappropriate conclusions. The voicelines being spoken does not indicate that the two characters speaking know each other in the present, or know who each other are past their secret identities. What it does indicate is how they would get along in the present, their history, or the history of parties related to them. Reinhardt doesn’t know Reaper is Gabriel, but if he did, the glorylusted crusader would call him a traitor if he did manage to strike him down.